V4L/DVB: ov511: cleanup: remove unneeded null check
authorDan Carpenter <error27@gmail.com>
Wed, 5 May 2010 05:59:48 +0000 (02:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:59:13 +0000 (12:59 -0300)
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.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/ov511.c

index 6085d55825559e57cd79edc9b695119af87faf68..a10912097b7a0a1201a01998c4286e39667b6331 100644 (file)
@@ -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;