diff mbox

drivers/media/video: avoid NULL dereference

Message ID Pine.LNX.4.64.1003230722290.8768@ask.diku.dk (mailing list archive)
State Accepted
Delegated to: Douglas Landgraf
Headers show

Commit Message

Julia Lawall March 23, 2010, 6:22 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index e0bce8d..dd1b1ac 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -5916,11 +5916,6 @@  ov51x_disconnect(struct usb_interface *intf)
 	mutex_lock(&ov->lock);
 	usb_set_intfdata (intf, NULL);
 
-	if (!ov) {
-		mutex_unlock(&ov->lock);
-		return;
-	}
-
 	/* Free device number */
 	ov511_devused &= ~(1 << ov->nr);