]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
UPSTREAM: 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)
committerGerrit <chrome-bot@google.com>
Fri, 30 Nov 2012 23:48:38 +0000 (15:48 -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>
(cherry picked from commit e143ef8f297d980037149fe2dc62af72621a0f5e)

Change-Id: I54263239917ce6394322b9c15f7621b2ef4c9383
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38997
Reviewed-by: Olof Johansson <olofj@chromium.org>
drivers/staging/gdm72xx/gdm_usb.c

index 3709824e7ca32c6044f3b08de660ab7ac95bc00b..bce6104bbab8762c64ef620620bae65539d844fd 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;
                }