* [PATCH] [media] v4l: Casting (void *) value returned by kmalloc is useless
@ 2011-11-17 22:43 Thomas Meyer
0 siblings, 0 replies; only message in thread
From: Thomas Meyer @ 2011-11-17 22:43 UTC (permalink / raw)
To: mchehab, linux-media, linux-kernel
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>
---
diff -u -p a/drivers/media/video/vino.c b/drivers/media/video/vino.c
--- a/drivers/media/video/vino.c 2011-11-07 19:37:51.673341747 +0100
+++ b/drivers/media/video/vino.c 2011-11-08 09:05:04.618617718 +0100
@@ -708,7 +708,7 @@ static int vino_allocate_buffer(struct v
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-11-18 9:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-17 22:43 [PATCH] [media] v4l: Casting (void *) value returned by kmalloc is useless Thomas Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox