Skip to content

Commit

Permalink
staging: ced1401: remove useless value cast on kmalloc()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fengguang Wu authored and Greg Kroah-Hartman committed Oct 30, 2012
1 parent c2a6a55 commit e6c5abf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/ced1401/ced_ioc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e6c5abf

Please sign in to comment.