mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 15:11:50 +00:00
USB: wusbcore/wa-xfer, fix lock imbalance
Fix locking on one wa_urb_enqueue_b's fail path. There was omitted unlock. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
a08b43aee4
commit
49fa09215c
@ -921,8 +921,10 @@ static void wa_urb_enqueue_b(struct wa_xfer *xfer)
|
|||||||
result = -ENODEV;
|
result = -ENODEV;
|
||||||
/* FIXME: segmentation broken -- kills DWA */
|
/* FIXME: segmentation broken -- kills DWA */
|
||||||
mutex_lock(&wusbhc->mutex); /* get a WUSB dev */
|
mutex_lock(&wusbhc->mutex); /* get a WUSB dev */
|
||||||
if (urb->dev == NULL)
|
if (urb->dev == NULL) {
|
||||||
|
mutex_unlock(&wusbhc->mutex);
|
||||||
goto error_dev_gone;
|
goto error_dev_gone;
|
||||||
|
}
|
||||||
wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
|
wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
|
||||||
if (wusb_dev == NULL) {
|
if (wusb_dev == NULL) {
|
||||||
mutex_unlock(&wusbhc->mutex);
|
mutex_unlock(&wusbhc->mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user