diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-12-12 18:25:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 19:03:37 -0200 |
commit | 544e6175330c86ad87abeeb1b048f56bafd96c31 (patch) | |
tree | edf329c8e7266e2862dcc0c037ff8636ce65641f | |
parent | 0991112c1c4625323df8a582de1b2f8609922248 (diff) |
V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths-fix
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>
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index d929ced58ec..92e72910792 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c @@ -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; } |