Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8ecf829 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Felipe Balbi
Browse files

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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ded017ee
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;