dect
/
linux-2.6
Archived
13
0
Fork 0

staging: ced1401: remove useless value cast on kmalloc()

Casting value returned by k[cmz]alloc to (struct page * *) is useless.

Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci

Reported-by: Fengguang Wu <fengguang.wu@intel.com>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Fengguang Wu 2012-10-27 11:29:03 +08:00 committed by Greg Kroah-Hartman
parent c2a6a5528f
commit e6c5abf254
1 changed files with 1 additions and 2 deletions

View File

@ -697,8 +697,7 @@ static int SetArea(DEVICE_EXTENSION * pdx, int nArea, char __user * puBuf,
return -EFAULT; // ...then we are done
// Now allocate space to hold the page pointer and virtual address pointer tables
pPages =
(struct page **)kmalloc(len * sizeof(struct page *), GFP_KERNEL);
pPages = kmalloc(len * sizeof(struct page *), GFP_KERNEL);
if (!pPages) {
iReturn = U14ERR_NOMEMORY;
goto error;