From: Dan Carpenter Date: Mon, 29 Mar 2010 09:01:27 +0000 (+0300) Subject: USB: oxu210hp: release spinlock on error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82a5eeb9f486366ad1b6c3be2e0d328ca185aa7e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git USB: oxu210hp: release spinlock on error path Smatch complained about this missing spinlock. Signed-off-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/oxu210hp-hcd.c b/drivers/usb/host/oxu210hp-hcd.c index 50f57f468836..e62b30b3e429 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;