diff options
author | Julia Lawall <julia@diku.dk> | 2010-04-06 01:51:04 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 11:56:42 -0400 |
commit | e20144770f5a119516f93959eca9818fa5ff065e (patch) | |
tree | 491a1b12736c1659a278517df77a38f33779bee8 /drivers/media/video/ov511.c | |
parent | d49f7a240575937703f04d07cf41be1672ce2e25 (diff) |
V4L/DVB: drivers/media/video: avoid NULL dereference
It seems impossible for ov to be NULL at this point.
The semantic match that finds the problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression E, E1;
identifier f;
statement S1,S3;
iterator iter;
@@
if ((E == NULL && ...) || ...)
{
... when != false ((E == NULL && ...) || ...)
when != true ((E != NULL && ...) || ...)
when != iter(E,...) S1
when != E = E1
(
sizeof(E->f)
|
* E->f
)
... when any
return ...;
}
else S3
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r-- | drivers/media/video/ov511.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index e0bce8dc74bf..dd1b1ac1a0ef 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c | |||
@@ -5916,11 +5916,6 @@ ov51x_disconnect(struct usb_interface *intf) | |||
5916 | mutex_lock(&ov->lock); | 5916 | mutex_lock(&ov->lock); |
5917 | usb_set_intfdata (intf, NULL); | 5917 | usb_set_intfdata (intf, NULL); |
5918 | 5918 | ||
5919 | if (!ov) { | ||
5920 | mutex_unlock(&ov->lock); | ||
5921 | return; | ||
5922 | } | ||
5923 | |||
5924 | /* Free device number */ | 5919 | /* Free device number */ |
5925 | ov511_devused &= ~(1 << ov->nr); | 5920 | ov511_devused &= ~(1 << ov->nr); |
5926 | 5921 | ||