From: Dan Carpenter Date: Wed, 5 May 2010 05:59:48 +0000 (-0300) Subject: V4L/DVB: ov511: cleanup: remove unneeded null check X-Git-Tag: v2.6.35-rc1~480^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9245d80c375b93db79475ca231276e1fa5a7649;p=platform%2Fkernel%2Flinux-stable.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 6085d55..a109120 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;