diff options
author | Dan Carpenter <error27@gmail.com> | 2010-05-05 07:59:48 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 17:59:13 +0200 |
commit | b9245d80c375b93db79475ca231276e1fa5a7649 (patch) | |
tree | e0647a8c551ca982be1df56d07ca1b3d689d158b | |
parent | V4L/DVB: media/mem2mem: dereferencing free memory (diff) | |
download | linux-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>
-rw-r--r-- | drivers/media/video/ov511.c | 2 |
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; |