staging: ced1401: remove useless value cast on kmalloc()
authorFengguang Wu <fengguang.wu@intel.com>
Sat, 27 Oct 2012 03:29:03 +0000 (11:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Oct 2012 18:06:59 +0000 (11:06 -0700)
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>
drivers/staging/ced1401/ced_ioc.c

index 0adba75be8b7435f0cb09fe4a887df6650dfa567..efe6aecbf9b73d82741874bbf9a763ef03ca1905 100644 (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;
This page took 0.028442 seconds and 5 git commands to generate.