diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-07-20 15:59:35 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-11 12:53:21 +0300 |
commit | e2c84ccb0fbe5e524d15bb09c042a6ca634adaed (patch) | |
tree | 97c1bcec456783f436727cc426dda20aa8e0ccbb /drivers/media/usb/usbvision | |
parent | 4eeda6faaec4b11e3738ba3ad533d440f628faca (diff) | |
download | linux-e2c84ccb0fbe5e524d15bb09c042a6ca634adaed.tar.xz |
[media] usbvision: fix locking error
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>
Diffstat (limited to 'drivers/media/usb/usbvision')
-rw-r--r-- | drivers/media/usb/usbvision/usbvision-video.c | 2 |
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 4f425f3600f6..a5e82c08f13f 100644 --- a/drivers/media/usb/usbvision/usbvision-video.c +++ b/drivers/media/usb/usbvision/usbvision-video.c @@ -426,13 +426,13 @@ static int usbvision_v4l2_close(struct file *file) usbvision_scratch_free(usbvision); usbvision->user--; + mutex_unlock(&usbvision->v4l2_lock); if (usbvision->remove_pending) { printk(KERN_INFO "%s: Final disconnect\n", __func__); usbvision_release(usbvision); return 0; } - mutex_unlock(&usbvision->v4l2_lock); PDEBUG(DBG_IO, "success"); return v4l2_fh_release(file); |