From: Fengguang Wu Date: Sat, 27 Oct 2012 03:29:03 +0000 (+0800) Subject: staging: ced1401: remove useless value cast on kmalloc() X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=e6c5abf2542f1a91d31ae536707c00cf0ceaf376;p=deliverable%2Flinux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/ced1401/ced_ioc.c b/drivers/staging/ced1401/ced_ioc.c index 0adba75be8b7..efe6aecbf9b7 100644 --- a/drivers/staging/ced1401/ced_ioc.c +++ b/drivers/staging/ced1401/ced_ioc.c @@ -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;