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

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

[media] usbvision: fix locking error



[ Upstream commit e2c84ccb0fbe5e524d15bb09c042a6ca634adaed ]

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