Skip to contentSkip to conversation

usb/oxu210hp: release spinlock on error path

PATCH New Dan Carpenter 1 participant 1 message Mar 29, 2010

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

PATCH 1/1 usb/oxu210hp: release spinlock on error path

Smatch complained about this missing spinlock.

---
Compile tested only. :/

drivers/usb/host/oxu210hp-hcd.c +3 -3
index 50f57f4..e62b30b 100644
@@ -660,13 +660,13 @@ static struct ehci_qh *oxu_qh_alloc(struct oxu_hcd *oxu)
 		if (qh->dummy = NULL) {
 			oxu_dbg(oxu, "no dummy td\n");
 			oxu->qh_used[i] = 0;
-
-			return NULL;
+			qh = NULL;
+			goto unlock;
 		}
 
 		oxu->qh_used[i] = 1;
 	}
-
+unlock:
 	spin_unlock(&oxu->mem_lock);
 
 	return qh;