Commit 46c9844c4014be53c67622dcd3ba4302f36e9cac

Authored by Jiri Slaby
Committed by Greg Kroah-Hartman
1 parent 909b6c3fc2

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>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

drivers/usb/misc/adutux.c
... ... @@ -376,7 +376,7 @@
376 376 if (dev->open_count <= 0) {
377 377 dbg(1," %s : device not opened", __func__);
378 378 retval = -ENODEV;
379   - goto exit;
  379 + goto unlock;
380 380 }
381 381  
382 382 adu_release_internal(dev);
383 383  
... ... @@ -385,9 +385,9 @@
385 385 if (!dev->open_count) /* ... and we're the last user */
386 386 adu_delete(dev);
387 387 }
388   -
389   -exit:
  388 +unlock:
390 389 mutex_unlock(&adutux_mutex);
  390 +exit:
391 391 dbg(2," %s : leave, return value %d", __func__, retval);
392 392 return retval;
393 393 }