From e143ef8f297d980037149fe2dc62af72621a0f5e Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 29 Nov 2012 17:17:25 +0300 Subject: [PATCH] staging: gdm72xx: unlock on error in init_usb() We recently added locking here and there was an error path which is missing an unlock. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gdm72xx/gdm_usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/gdm72xx/gdm_usb.c b/drivers/staging/gdm72xx/gdm_usb.c index 3709824e7ca3..bce6104bbab8 100644 --- a/drivers/staging/gdm72xx/gdm_usb.c +++ b/drivers/staging/gdm72xx/gdm_usb.c @@ -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; } -- 2.20.1