]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 12 Dec 2007 21:25:23 +0000 (18:25 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 25 Jan 2008 21:03:37 +0000 (19:03 -0200)
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 d929ced58ec31db597c502c4e859bceac458540d..92e72910792b0ba582cc8078411e3fe769856f7d 100644 (file)
@@ -1290,8 +1290,8 @@ 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;
+                       errCode = -EBUSY;
+                       goto out;
                }
 
                // If so far no errors then we shall start the radio
@@ -1308,6 +1308,7 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
                        usbvision->initialized = 0;
                }
        }
+out:
        mutex_unlock(&usbvision->lock);
        return errCode;
 }