diff options
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/adutux.c | 6 | ||||
-rw-r--r-- | drivers/usb/misc/vstusb.c | 1 |
2 files changed, 4 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 | 388 | unlock: | |
389 | exit: | ||
390 | mutex_unlock(&adutux_mutex); | 389 | mutex_unlock(&adutux_mutex); |
390 | exit: | ||
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 | } |
diff --git a/drivers/usb/misc/vstusb.c b/drivers/usb/misc/vstusb.c index 63dff9ba73c5..f26ea8dc1577 100644 --- a/drivers/usb/misc/vstusb.c +++ b/drivers/usb/misc/vstusb.c | |||
@@ -401,6 +401,7 @@ static ssize_t vstusb_write(struct file *file, const char __user *buffer, | |||
401 | } | 401 | } |
402 | 402 | ||
403 | if (copy_from_user(buf, buffer, count)) { | 403 | if (copy_from_user(buf, buffer, count)) { |
404 | mutex_unlock(&vstdev->lock); | ||
404 | dev_err(&dev->dev, "%s: can't copy_from_user\n", __func__); | 405 | dev_err(&dev->dev, "%s: can't copy_from_user\n", __func__); |
405 | retval = -EFAULT; | 406 | retval = -EFAULT; |
406 | goto exit; | 407 | goto exit; |