summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorThierry MERLE <thierry.merle@free.fr>2007-12-12 22:22:48 +0100
committerThierry MERLE <thierry.merle@free.fr>2007-12-12 22:22:48 +0100
commite957db9edd45ce247ae6eda39c5e0cb07d3230fa (patch)
tree6705e2fb12f20960f44dc58add15ec4c2ee0f06e /linux
parent4981413b8584d461413c56d89f91b5d11796aa31 (diff)
downloadmediapointer-dvb-s2-e957db9edd45ce247ae6eda39c5e0cb07d3230fa.tar.gz
mediapointer-dvb-s2-e957db9edd45ce247ae6eda39c5e0cb07d3230fa.tar.bz2
media: video: usbvision: add mutex_unlock() to error paths
From: Daniel Walker <dwalker@mvista.com> 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> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index 04a38c355..92d2a92fd 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c
@@ -1339,6 +1339,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;
}
@@ -1964,6 +1965,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;
}