Skip to content

Commit

Permalink
V4L/DVB: ov511: cleanup: remove unneeded null check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed May 19, 2010
1 parent 16ee9bb commit b9245d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/ov511.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9245d8

Please sign in to comment.