Skip to contentSkip to conversation

staging: gdm72xx: unlock on error in init_usb()

PATCH New Dan Carpenter 1 participant 1 message Nov 29, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: gdm72xx: unlock on error in init_usb()

We recently added locking here and there was an error path which is missing an unlock.

drivers/staging/gdm72xx/gdm_usb.c +1 -0
index e434764..e0cb2ff 100644
@@ -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;
 		}