Skip to contentSkip to conversation

media/ov511: cleanup: remove unneeded null check

PATCH New Dan Carpenter 1 participant 1 message May 5, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media/ov511: cleanup: remove unneeded null check

We dereference "ov" unconditionally throughout the function so there is no way it can be NULL here. This code has been around for ages so if it were possible for "ov" to be NULL someone would have complained.

drivers/media/video/ov511.c +1 -1
index 6085d55..a109120 100644
@@ -5940,7 +5940,7 @@ ov51x_disconnect(struct usb_interface *intf)
 	ov->dev = NULL;
 
 	/* Free the memory */
-	if (ov && !ov->user) {
+	if (!ov->user) {
 		mutex_lock(&ov->cbuf_lock);
 		kfree(ov->cbuf);
 		ov->cbuf = NULL;