aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2012-07-02 02:50:24 -0400
committerFelipe Balbi <balbi@ti.com>2012-07-02 03:41:00 -0400
commitf8ecf829481b2cc7301a811da9d2df53ef174977 (patch)
tree8863b65cf525eacab1dbaa32989f3f1372f21c2c
parentded017ee6c7b90f7356bd8488f8af1c10ba90490 (diff)
usb: phy: fix error handling in usb_get_phy
spin_unlock_irqrestore() was not being called in the error path of usb_get_phy. It's fixed here. Reported-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/otg/otg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 88d62b16f632..1bf60a22595c 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -98,11 +98,12 @@ struct usb_phy *usb_get_phy(enum usb_phy_type type)
98 if (IS_ERR(phy)) { 98 if (IS_ERR(phy)) {
99 pr_err("unable to find transceiver of type %s\n", 99 pr_err("unable to find transceiver of type %s\n",
100 usb_phy_type_string(type)); 100 usb_phy_type_string(type));
101 return phy; 101 goto err0;
102 } 102 }
103 103
104 get_device(phy->dev); 104 get_device(phy->dev);
105 105
106err0:
106 spin_unlock_irqrestore(&phy_lock, flags); 107 spin_unlock_irqrestore(&phy_lock, flags);
107 108
108 return phy; 109 return phy;