summaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2012-07-02 08:50:24 +0200
committerFelipe Balbi2012-07-02 09:41:00 +0200
commitf8ecf829481b2cc7301a811da9d2df53ef174977 (patch)
tree8863b65cf525eacab1dbaa32989f3f1372f21c2c /drivers/usb/otg
parentusb: phy: fix return value check of usb_get_phy (diff)
downloadkernel-qcow2-linux-f8ecf829481b2cc7301a811da9d2df53ef174977.tar.gz
kernel-qcow2-linux-f8ecf829481b2cc7301a811da9d2df53ef174977.tar.xz
kernel-qcow2-linux-f8ecf829481b2cc7301a811da9d2df53ef174977.zip
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>
Diffstat (limited to 'drivers/usb/otg')
-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)
if (IS_ERR(phy)) {
pr_err("unable to find transceiver of type %s\n",
usb_phy_type_string(type));
- return phy;
+ goto err0;
}
get_device(phy->dev);
+err0:
spin_unlock_irqrestore(&phy_lock, flags);
return phy;