V4L/DVB (6810): media: video: usbvision: add mutex_unlock() to error paths
authorDaniel Walker <dwalker@mvista.com>
Wed, 12 Dec 2007 21:22:48 +0000 (18:22 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:36 +0000 (19:03 -0200)
There are a few error paths which don't unlock the usbvision->lock.

So I've added mutex_unlock() calls to fix those paths.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/usbvision/usbvision-video.c

index e34f311124e3992a36711d53b9aa57e16dab3ce7..d929ced58ec31db597c502c4e859bceac458540d 100644 (file)
@@ -1290,6 +1290,7 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
                errCode = usbvision_set_alternate(usbvision);
                if (errCode < 0) {
                        usbvision->last_error = errCode;
+                       mutex_unlock(&usbvision->lock);
                        return -EBUSY;
                }
 
@@ -1807,6 +1808,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf,
                                              usbvision->num_alt,GFP_KERNEL);
        if (usbvision->alt_max_pkt_size == NULL) {
                err("usbvision: out of memory!\n");
+               mutex_unlock(&usbvision->lock);
                return -ENOMEM;
        }