mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
909b6c3fc2
commit
46c9844c40
1 changed files with 3 additions and 3 deletions
|
@ -376,7 +376,7 @@ static int adu_release(struct inode *inode, struct file *file)
|
||||||
if (dev->open_count <= 0) {
|
if (dev->open_count <= 0) {
|
||||||
dbg(1," %s : device not opened", __func__);
|
dbg(1," %s : device not opened", __func__);
|
||||||
retval = -ENODEV;
|
retval = -ENODEV;
|
||||||
goto exit;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
adu_release_internal(dev);
|
adu_release_internal(dev);
|
||||||
|
@ -385,9 +385,9 @@ static int adu_release(struct inode *inode, struct file *file)
|
||||||
if (!dev->open_count) /* ... and we're the last user */
|
if (!dev->open_count) /* ... and we're the last user */
|
||||||
adu_delete(dev);
|
adu_delete(dev);
|
||||||
}
|
}
|
||||||
|
unlock:
|
||||||
exit:
|
|
||||||
mutex_unlock(&adutux_mutex);
|
mutex_unlock(&adutux_mutex);
|
||||||
|
exit:
|
||||||
dbg(2," %s : leave, return value %d", __func__, retval);
|
dbg(2," %s : leave, return value %d", __func__, retval);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue