From e957db9edd45ce247ae6eda39c5e0cb07d3230fa Mon Sep 17 00:00:00 2001 From: Thierry MERLE Date: Wed, 12 Dec 2007 22:22:48 +0100 Subject: media: video: usbvision: add mutex_unlock() to error paths From: Daniel Walker 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 Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Thierry MERLE --- linux/drivers/media/video/usbvision/usbvision-video.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3