OSDN Git Service

staging: gdm72xx: unlock on error in init_usb()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Nov 2012 14:17:25 +0000 (17:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Nov 2012 02:16:15 +0000 (18:16 -0800)
We recently added locking here and there was an error path which is
missing an unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/gdm72xx/gdm_usb.c

index 3709824..bce6104 100644 (file)
@@ -205,6 +205,7 @@ static int init_usb(struct usbwm_dev *udev)
        for (i = 0; i < MAX_NR_SDU_BUF; i++) {
                t = alloc_tx_struct(tx);
                if (t == NULL) {
+                       spin_unlock_irqrestore(&tx->lock, flags);
                        ret = -ENOMEM;
                        goto fail;
                }