Skip to content

Commit

Permalink
USB: misc/adutux, fix lock imbalance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Mar 17, 2009
1 parent 909b6c3 commit 46c9844
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/misc/adutux.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ static int adu_release(struct inode *inode, struct file *file)
if (dev->open_count <= 0) {
dbg(1," %s : device not opened", __func__);
retval = -ENODEV;
goto exit;
goto unlock;
}

adu_release_internal(dev);
Expand All @@ -385,9 +385,9 @@ static int adu_release(struct inode *inode, struct file *file)
if (!dev->open_count) /* ... and we're the last user */
adu_delete(dev);
}

exit:
unlock:
mutex_unlock(&adutux_mutex);
exit:
dbg(2," %s : leave, return value %d", __func__, retval);
return retval;
}
Expand Down

0 comments on commit 46c9844

Please sign in to comment.