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

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

[media] dt3155v4l: fix incorrect mutex locking



A mutex_unlock was missing in the 'success' path of the open() call,
and also at one error path in the same function.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 48fc9e26
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ dt3155_open(struct file *filp)
		pd->field_count = 0;
		ret = vb2_queue_init(pd->q);
		if (ret < 0)
			return ret;
			goto err_request_irq;
		INIT_LIST_HEAD(&pd->dmaq);
		spin_lock_init(&pd->lock);
		/* disable all irqs, clear all irq flags */
@@ -410,6 +410,7 @@ dt3155_open(struct file *filp)
			goto err_request_irq;
	}
	pd->users++;
	mutex_unlock(&pd->mux);
	return 0; /* success */
err_request_irq:
	kfree(pd->q);