summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov511.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-05-05 07:59:48 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 17:59:13 +0200
commitb9245d80c375b93db79475ca231276e1fa5a7649 (patch)
treee0647a8c551ca982be1df56d07ca1b3d689d158b /drivers/media/video/ov511.c
parentV4L/DVB: media/mem2mem: dereferencing free memory (diff)
downloadlinux-b9245d80c375b93db79475ca231276e1fa5a7649.tar.xz
linux-b9245d80c375b93db79475ca231276e1fa5a7649.zip
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 <error27@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r--drivers/media/video/ov511.c2
1 files changed, 1 insertions, 1 deletions
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;