Commit 925f2392 authored by Hans Verkuil's avatar Hans Verkuil Committed by Sasha Levin

[media] usbvision: fix locking error

[ Upstream commit e2c84ccb ]

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>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent ee289602
......@@ -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