Commit cba13728 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Kishon Vijay Abraham I

phy: amlogic: phy-meson-gxl-usb2: don't log an error on -EPROBE_DEFER

devm_phy_create can return -EPROBE_DEFER if the phy-supply is not ready
yet. Silence this warning as the driver framework will re-attempt
registering the PHY - this second try works without any errors. So only
log actual errors to keep the kernel log free of misleading error
messages.
Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent d2eced94
...@@ -210,6 +210,7 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) ...@@ -210,6 +210,7 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
struct phy_meson_gxl_usb2_priv *priv; struct phy_meson_gxl_usb2_priv *priv;
struct phy *phy; struct phy *phy;
void __iomem *base; void __iomem *base;
int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv) if (!priv)
...@@ -242,8 +243,11 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev) ...@@ -242,8 +243,11 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
phy = devm_phy_create(dev, NULL, &phy_meson_gxl_usb2_ops); phy = devm_phy_create(dev, NULL, &phy_meson_gxl_usb2_ops);
if (IS_ERR(phy)) { if (IS_ERR(phy)) {
dev_err(dev, "failed to create PHY\n"); ret = PTR_ERR(phy);
return PTR_ERR(phy); if (ret != -EPROBE_DEFER)
dev_err(dev, "failed to create PHY\n");
return ret;
} }
phy_set_drvdata(phy, priv); phy_set_drvdata(phy, priv);
......
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