]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
[media] dt3155v4l: fix incorrect mutex locking
authorHans Verkuil <hans.verkuil@cisco.com>
Wed, 10 Apr 2013 11:05:00 +0000 (08:05 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 14 Apr 2013 23:03:09 +0000 (20:03 -0300)
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>
drivers/staging/media/dt3155v4l/dt3155v4l.c

index 073b3b35f8f42de2697dfe6e1e85a47ba019a000..57fadead0643f68b2d9479cf4fa4336d5f75ceea 100644 (file)
@@ -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);