kernel-ark/drivers/media/video/usbvideo
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
..
ibmcam.c V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc 2009-01-07 22:18:56 -02:00
Kconfig V4L/DVB (12088): Mark the v4l1 uvcvideo quickcam messenger driver as deprecated 2009-06-23 03:13:33 -03:00
konicawc.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
Makefile
quickcam_messenger.c V4L/DVB: drivers/media/video: move dereference after NULL test 2010-05-18 00:47:16 -03:00
quickcam_messenger.h
ultracam.c V4L/DVB (10185): Use negated usb_endpoint_xfer_control, etc 2009-01-07 22:18:56 -02:00
usbvideo.c V4L/DVB (13550): v4l: Use the new video_device_node_name function 2009-12-16 00:17:55 -02:00
usbvideo.h
vicam.c V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignments 2009-12-16 00:17:57 -02:00