summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-04-10 08:05:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-14 20:03:09 -0300
commit228b791bfd52f437fd9a04fe9432dfec9c0d0333 (patch)
tree177bc7f566cf7c49e6f7d9717127424560af9bc2 /drivers
parent48fc9e26705f3c681a5a5fcd97f28be2c2393237 (diff)
[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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/media/dt3155v4l/dt3155v4l.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c
index 073b3b35f8f..57fadead064 100644
--- a/drivers/staging/media/dt3155v4l/dt3155v4l.c
+++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c
@@ -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);