Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2c84ccb authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] usbvision: fix locking error



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>
parent 4eeda6fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);