Commit 92c414a1 authored by Jonas Gorski's avatar Jonas Gorski Committed by Greg Kroah-Hartman

usb: ehci-orion: fix probe for !GENERIC_PHY

commit db1319e1 upstream.

Commit d445913c ("usb: ehci-orion: add optional PHY support")
added support for optional phys, but devm_phy_optional_get returns
-ENOSYS if GENERIC_PHY is not enabled.

This causes probe failures, even when there are no phys specified:

[    1.443365] orion-ehci f1058000.usb: init f1058000.usb fail, -38
[    1.449403] orion-ehci: probe of f1058000.usb failed with error -38

Similar to dwc3, treat -ENOSYS as no phy.

Fixes: d445913c ("usb: ehci-orion: add optional PHY support")
Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3a247e0
...@@ -226,6 +226,7 @@ static int ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -226,6 +226,7 @@ static int ehci_orion_drv_probe(struct platform_device *pdev)
priv->phy = devm_phy_optional_get(&pdev->dev, "usb"); priv->phy = devm_phy_optional_get(&pdev->dev, "usb");
if (IS_ERR(priv->phy)) { if (IS_ERR(priv->phy)) {
err = PTR_ERR(priv->phy); err = PTR_ERR(priv->phy);
if (err != -ENOSYS)
goto err_phy_get; goto err_phy_get;
} else { } else {
err = phy_init(priv->phy); err = phy_init(priv->phy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment