]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: wusbcore/wa-xfer, fix lock imbalance
authorJiri Slaby <jirislaby@gmail.com>
Wed, 11 Mar 2009 20:47:40 +0000 (21:47 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 Mar 2009 21:01:29 +0000 (14:01 -0700)
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>
drivers/usb/wusbcore/wa-xfer.c

index 238a96aee3a1c387c6c386154caf72ddd88a36c8..613a5fc490d3575a200e0876be50eb31c354549e 100644 (file)
@@ -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);