提交 f8ecf829 编写于 作者: K Kishon Vijay Abraham I 提交者: Felipe Balbi

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: NMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 ded017ee
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册