aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2009-03-11 16:47:38 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-03-17 17:01:29 -0400
commit46c9844c4014be53c67622dcd3ba4302f36e9cac (patch)
treeeb02befaf420ec7e4da6848cd6d48321f759d3ad /drivers/usb/misc
parent909b6c3fc20ea772dc63a03986d74148fcbb1a1d (diff)
USB: misc/adutux, fix lock imbalance
Don't unlock adutux_mutex when not held. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/adutux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/misc/adutux.c b/drivers/usb/misc/adutux.c
index 7b6922e08ed1..203526542013 100644
--- a/drivers/usb/misc/adutux.c
+++ b/drivers/usb/misc/adutux.c
@@ -376,7 +376,7 @@ static int adu_release(struct inode *inode, struct file *file)
376 if (dev->open_count <= 0) { 376 if (dev->open_count <= 0) {
377 dbg(1," %s : device not opened", __func__); 377 dbg(1," %s : device not opened", __func__);
378 retval = -ENODEV; 378 retval = -ENODEV;
379 goto exit; 379 goto unlock;
380 } 380 }
381 381
382 adu_release_internal(dev); 382 adu_release_internal(dev);
@@ -385,9 +385,9 @@ static int adu_release(struct inode *inode, struct file *file)
385 if (!dev->open_count) /* ... and we're the last user */ 385 if (!dev->open_count) /* ... and we're the last user */
386 adu_delete(dev); 386 adu_delete(dev);
387 } 387 }
388 388unlock:
389exit:
390 mutex_unlock(&adutux_mutex); 389 mutex_unlock(&adutux_mutex);
390exit:
391 dbg(2," %s : leave, return value %d", __func__, retval); 391 dbg(2," %s : leave, return value %d", __func__, retval);
392 return retval; 392 return retval;
393} 393}