浏览代码

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>
Dan Carpenter 15 年之前
父节点
当前提交
b9245d80c3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/media/video/ov511.c

+ 1 - 1
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;