Commit 5ce625a4 authored by Insu Yun's avatar Insu Yun Committed by Mauro Carvalho Chehab

[media] usbvision: fix locking error

When remove_pending is non-zero, v4l2_lock is never unlocked.
Signed-off-by: default avatarInsu Yun <wuninsu@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 137aa361
......@@ -1147,6 +1147,7 @@ static int usbvision_radio_close(struct file *file)
usbvision_audio_off(usbvision);
usbvision->radio = 0;
usbvision->user--;
mutex_unlock(&usbvision->v4l2_lock);
if (usbvision->remove_pending) {
printk(KERN_INFO "%s: Final disconnect\n", __func__);
......@@ -1155,7 +1156,6 @@ static int usbvision_radio_close(struct file *file)
return 0;
}
mutex_unlock(&usbvision->v4l2_lock);
PDEBUG(DBG_IO, "success");
return v4l2_fh_release(file);
}
......
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