* [patch] usb/oxu210hp: release spinlock on error path
@ 2010-03-29 9:01 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-03-29 9:01 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Anand Gadiyar, David Brownell, linux-usb, linux-kernel,
kernel-janitors
Smatch complained about this missing spinlock.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
Compile tested only. :/
diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c
index 50f57f4..e62b30b 100644
--- a/drivers/usb/host/oxu210hp-hcd.c
+++ b/drivers/usb/host/oxu210hp-hcd.c
@@ -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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-29 9:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-29 9:01 [patch] usb/oxu210hp: release spinlock on error path Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox