Commit d6b3346c authored by Hans Verkuil's avatar Hans Verkuil Committed by Jiri Slaby

[media] usbvision: fix locking error

commit e2c84ccb upstream.

If remove_pending is non-zero, then the v4l2_lock is never unlocked.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Oliver Neukum <ONeukum@suse.com>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 89326f35
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment