[media] v4l: Casting (void *) value returned by kmalloc is useless
authorThomas Meyer <thomas@m3y3r.de>
Thu, 17 Nov 2011 21:43:40 +0000 (18:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 24 Nov 2011 23:06:57 +0000 (21:06 -0200)
The semantic patch that makes this change is available
in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/vino.c

index 52a0a3736c820d156025c8fc91df13d20cb31663..4d7391ec80013279d965db1070f978f3948cf241 100644 (file)
@@ -708,7 +708,7 @@ static int vino_allocate_buffer(struct vino_framebuffer *fb,
                size, count);
 
        /* allocate memory for table with virtual (page) addresses */
-       fb->desc_table.virtual = (unsigned long *)
+       fb->desc_table.virtual =
                kmalloc(count * sizeof(unsigned long), GFP_KERNEL);
        if (!fb->desc_table.virtual)
                return -ENOMEM;