diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-27 16:36:45 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 08:24:22 +0400 |
commit | 4202066c6995200b2755a4501ea90f5d4e163e41 (patch) | |
tree | 4d1dfe0734e9992efae9c42a81f9c5c50cbcbfa0 /drivers/media/video/usbvision | |
parent | 5c331fc8c19e181bffab46e9d18e1637cdc47170 (diff) | |
download | linux-4202066c6995200b2755a4501ea90f5d4e163e41.tar.xz |
V4L/DVB: drivers/media: Eliminate a NULL pointer dereference
In each case, the print involves dereferencing a value that is NULL or is
near NULL.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@
if ((E == NULL && ...) || ...)
{
... when != if (...) S1 else S2
when != E = E1
* E->f
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/usbvision')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 6248a639ba2d..c2690df33438 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -1671,8 +1671,7 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) PDEBUG(DBG_PROBE, ""); if (usbvision == NULL) { - dev_err(&usbvision->dev->dev, - "%s: usb_get_intfdata() failed\n", __func__); + pr_err("%s: usb_get_intfdata() failed\n", __func__); return; } |