From: Dan Carpenter Date: Wed, 5 May 2010 05:59:48 +0000 (-0300) Subject: V4L/DVB: ov511: cleanup: remove unneeded null check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b9245d80c375b93db79475ca231276e1fa5a7649;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB: 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. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c index 6085d5582555..a10912097b7a 100644 --- a/drivers/media/video/ov511.c +++ b/drivers/media/video/ov511.c @@ -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;