USB: oxu210hp: release spinlock on error path
authorDan Carpenter <error27@gmail.com>
Mon, 29 Mar 2010 09:01:27 +0000 (12:01 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 30 Apr 2010 16:25:11 +0000 (09:25 -0700)
Smatch complained about this missing spinlock.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/oxu210hp-hcd.c

index 50f57f468836da478f87c19e353dfb811f112b93..e62b30b3e4296e5e8fe157128b2206f1f5d25c52 100644 (file)
@@ -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;