diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-03-11 20:47:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-17 21:01:29 (GMT) |
commit | 49fa09215c03116449184057f062c6aea2f1d0b4 (patch) | |
tree | 7323170750f671c2f2a8f18444a9861cf1455115 /drivers | |
parent | a08b43aee46ed4272ad7bee2c785edcf313339b3 (diff) | |
download | linux-49fa09215c03116449184057f062c6aea2f1d0b4.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/wusbcore/wa-xfer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/wusbcore/wa-xfer.c b/drivers/usb/wusbcore/wa-xfer.c index 238a96a..613a5fc 100644 --- a/drivers/usb/wusbcore/wa-xfer.c +++ b/drivers/usb/wusbcore/wa-xfer.c @@ -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); |