android_kernel_motorola_sm6225/drivers/media/video/davinci
Julia Lawall 75e5ac7ea5 [media] drivers/media/video/davinci/vpbe.c: introduce missing kfree
vpbe_dev needs to be freed before leaving the function in an error case.

A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)

// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
x->f1
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-06 11:13:05 -02:00
..
ccdc_hw_device.h V4L/DVB (12249): v4l: ccdc hw device header file for vpfe capture 2009-09-19 00:18:13 -03:00
dm355_ccdc.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
dm355_ccdc_regs.h V4L/DVB (12250): v4l: dm355 ccdc module for vpfe capture driver 2009-09-19 00:18:15 -03:00
dm644x_ccdc.c drivers/media: Add module.h to all files using it implicitly 2011-10-31 19:31:51 -04:00
dm644x_ccdc_regs.h V4L/DVB: V4L: dm644x_ccdc: Add Suspend/Resume Support 2010-05-18 00:52:45 -03:00
isif.c V4L/DVB: V4L - vpfe capture - source for ISIF driver on DM365 2010-02-26 15:11:06 -03:00
isif_regs.h V4L/DVB: Fix bad whitespacing 2010-05-18 00:47:01 -03:00
Kconfig [media] davinci vpbe: Build infrastructure for VPBE driver 2011-07-27 17:53:10 -03:00
Makefile [media] davinci vpbe: Build infrastructure for VPBE driver 2011-07-27 17:53:10 -03:00
vpbe.c [media] drivers/media/video/davinci/vpbe.c: introduce missing kfree 2012-01-06 11:13:05 -02:00
vpbe_display.c [media] drivers/media/video/davinci/vpbe_display.c: eliminate a null pointer dereference 2011-11-07 13:13:15 -02:00
vpbe_osd.c [media] davinci vpbe: add dm365 and dm355 specific OSD changes 2012-01-06 10:00:56 -02:00
vpbe_osd_regs.h [media] davinci vpbe: OSD(On Screen Display) block 2011-07-27 17:53:10 -03:00
vpbe_venc.c [media] davinci vpbe: add VENC block changes to enable dm365 and dm355 2012-01-06 10:09:26 -02:00
vpbe_venc_regs.h [media] davinci vpbe: VENC( Video Encoder) implementation 2011-07-27 17:53:10 -03:00
vpfe_capture.c Fix common misspellings 2011-03-31 11:26:23 -03:00
vpif.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
vpif.h [media] vpif_cap/disp: Cleanup, improved comments 2011-01-19 11:28:19 -02:00
vpif_capture.c [media] Stop using linux/version.h on the remaining video drivers 2011-07-27 17:53:16 -03:00
vpif_capture.h [media] Stop using linux/version.h on the remaining video drivers 2011-07-27 17:53:16 -03:00
vpif_display.c [media] Stop using linux/version.h on the remaining video drivers 2011-07-27 17:53:16 -03:00
vpif_display.h [media] Stop using linux/version.h on the remaining video drivers 2011-07-27 17:53:16 -03:00
vpss.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00