Commit 49fa0921 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

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: default avatarJiri Slaby <jirislaby@gmail.com>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a08b43ae
......@@ -921,8 +921,10 @@ static void wa_urb_enqueue_b(struct wa_xfer *xfer)
result = -ENODEV;
/* FIXME: segmentation broken -- kills DWA */
mutex_lock(&wusbhc->mutex); /* get a WUSB dev */
if (urb->dev == NULL)
if (urb->dev == NULL) {
mutex_unlock(&wusbhc->mutex);
goto error_dev_gone;
}
wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev);
if (wusb_dev == NULL) {
mutex_unlock(&wusbhc->mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment