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>
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;