diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2013-04-10 07:05:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-04-14 19:03:09 -0400 |
commit | 228b791bfd52f437fd9a04fe9432dfec9c0d0333 (patch) | |
tree | 177bc7f566cf7c49e6f7d9717127424560af9bc2 | |
parent | 48fc9e26705f3c681a5a5fcd97f28be2c2393237 (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>
-rw-r--r-- | drivers/staging/media/dt3155v4l/dt3155v4l.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 073b3b35f8f4..57fadead0643 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c | |||
@@ -398,7 +398,7 @@ dt3155_open(struct file *filp) | |||
398 | pd->field_count = 0; | 398 | pd->field_count = 0; |
399 | ret = vb2_queue_init(pd->q); | 399 | ret = vb2_queue_init(pd->q); |
400 | if (ret < 0) | 400 | if (ret < 0) |
401 | return ret; | 401 | goto err_request_irq; |
402 | INIT_LIST_HEAD(&pd->dmaq); | 402 | INIT_LIST_HEAD(&pd->dmaq); |
403 | spin_lock_init(&pd->lock); | 403 | spin_lock_init(&pd->lock); |
404 | /* disable all irqs, clear all irq flags */ | 404 | /* disable all irqs, clear all irq flags */ |
@@ -410,6 +410,7 @@ dt3155_open(struct file *filp) | |||
410 | goto err_request_irq; | 410 | goto err_request_irq; |
411 | } | 411 | } |
412 | pd->users++; | 412 | pd->users++; |
413 | mutex_unlock(&pd->mux); | ||
413 | return 0; /* success */ | 414 | return 0; /* success */ |
414 | err_request_irq: | 415 | err_request_irq: |
415 | kfree(pd->q); | 416 | kfree(pd->q); |