summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-07-20 09:59:35 -0300
committerSasha Levin <sasha.levin@oracle.com>2015-12-03 09:57:36 -0500
commit925f239252af5aed32d174c0b6658a7bef854845 (patch)
tree00c7814de99650a0162321ccdd932ae55ab71d43
parentee289602d8ac1050e725d6899a73f7592c5668ad (diff)
downloadlwn-925f239252af5aed32d174c0b6658a7bef854845.tar.gz
lwn-925f239252af5aed32d174c0b6658a7bef854845.zip
[media] usbvision: fix locking error
[ Upstream commit e2c84ccb0fbe5e524d15bb09c042a6ca634adaed ] If remove_pending is non-zero, then the v4l2_lock is never unlocked. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--drivers/media/usb/usbvision/usbvision-video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 9bfa041e3316..d78689831aea 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -435,6 +435,7 @@ static int usbvision_v4l2_close(struct file *file)
usbvision_scratch_free(usbvision);
usbvision->user--;
+ mutex_unlock(&usbvision->v4l2_lock);
if (power_on_at_open) {
/* power off in a little while
@@ -448,7 +449,6 @@ static int usbvision_v4l2_close(struct file *file)
usbvision_release(usbvision);
return 0;
}
- mutex_unlock(&usbvision->v4l2_lock);
PDEBUG(DBG_IO, "success");
return 0;