Commit 544e6175 authored by Andrew Morton's avatar Andrew Morton Committed by Mauro Carvalho Chehab

V4L/DVB (6811): media-video-usbvision-add-mutex_unlock-to-error-paths-fix

Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarThierry MERLE <thierry.merle@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 0991112c
...@@ -1290,8 +1290,8 @@ static int usbvision_radio_open(struct inode *inode, struct file *file) ...@@ -1290,8 +1290,8 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
errCode = usbvision_set_alternate(usbvision); errCode = usbvision_set_alternate(usbvision);
if (errCode < 0) { if (errCode < 0) {
usbvision->last_error = errCode; usbvision->last_error = errCode;
mutex_unlock(&usbvision->lock); errCode = -EBUSY;
return -EBUSY; goto out;
} }
// If so far no errors then we shall start the radio // 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) ...@@ -1308,6 +1308,7 @@ static int usbvision_radio_open(struct inode *inode, struct file *file)
usbvision->initialized = 0; usbvision->initialized = 0;
} }
} }
out:
mutex_unlock(&usbvision->lock); mutex_unlock(&usbvision->lock);
return errCode; return errCode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment