linux/drivers/media/video/davinci
Julia Lawall 728385c4d3 V4L/DVB: drivers/media/video: move dereference after NULL test
In quickcam_messenger.c, if the NULL test on uvd is needed, then the
dereference should be after the NULL test.

In vpif_display.c, std_info is initialized to the address of a structure
field.  This seems unlikely to be NULL.  Test std_info->stdid instead.

In saa7134-alsa.c, the function is only called from one place, where the
chip argument has already been dereferenced.  On the other hand, if it
should be kept, then card should be initialized after it.

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

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:47:16 -03: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_regs.h V4L/DVB (12250): v4l: dm355 ccdc module for vpfe capture driver 2009-09-19 00:18:15 -03:00
dm355_ccdc.c V4L/DVB: vpfe-capture - converting dm355 ccdc driver to a platform driver 2010-02-26 15:10:45 -03:00
dm644x_ccdc_regs.h V4L/DVB (12251): v4l: dm644x ccdc module for vpfe capture driver 2009-09-19 00:18:16 -03:00
dm644x_ccdc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
isif_regs.h V4L/DVB: Fix bad whitespacing 2010-05-18 00:47:01 -03:00
isif.c V4L/DVB: V4L - vpfe capture - source for ISIF driver on DM365 2010-02-26 15:11:06 -03:00
Makefile V4L/DVB: V4L - vpfe capture - build environment for isif driver 2010-02-26 15:11:06 -03:00
vpfe_capture.c V4L/DVB: V4L - vpfe capture - fix for kernel crash 2010-05-06 19:19:05 -03:00
vpif_capture.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
vpif_capture.h V4L/DVB (12906c): V4L : vpif capture driver for DM6467 2009-09-19 00:19:39 -03:00
vpif_display.c V4L/DVB: drivers/media/video: move dereference after NULL test 2010-05-18 00:47:16 -03:00
vpif_display.h V4L/DVB (12176): davinci/vpif_display: Add VPIF display driver 2009-09-19 00:18:03 -03:00
vpif.c V4L/DVB (13607): vpif: move vpif_remove to .devexit 2009-12-16 00:18:37 -02:00
vpif.h V4L/DVB (12906d): V4L : vpif updates for DM6467 vpif capture driver 2009-09-19 00:19:40 -03:00
vpss.c V4L/DVB: V4L - vpfe capture - vpss driver enhancements for DM365 2010-02-26 15:11:06 -03:00