summaryrefslogtreecommitdiff
path: root/drivers/phy
diff options
context:
space:
mode:
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>2018-01-28 21:22:44 +0100
committerKishon Vijay Abraham I <kishon@ti.com>2018-03-08 13:56:26 +0530
commitcba1372812fbc740e57c1982970210ab2b804226 (patch)
tree1b248f6e04c06557d5962643da8705a1f86e449a /drivers/phy
parentd2eced94562f9d69705887e497fee0d17c3099eb (diff)
downloadlwn-cba1372812fbc740e57c1982970210ab2b804226.tar.gz
lwn-cba1372812fbc740e57c1982970210ab2b804226.zip
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: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/amlogic/phy-meson-gxl-usb2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/phy/amlogic/phy-meson-gxl-usb2.c b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
index e90c4ee25dfe..d68c30d3b510 100644
--- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
@@ -210,6 +210,7 @@ static int phy_meson_gxl_usb2_probe(struct platform_device *pdev)
struct phy_meson_gxl_usb2_priv *priv;
struct phy *phy;
void __iomem *base;
+ int ret;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
@@ -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);
if (IS_ERR(phy)) {
- dev_err(dev, "failed to create PHY\n");
- return PTR_ERR(phy);
+ ret = PTR_ERR(phy);
+ if (ret != -EPROBE_DEFER)
+ dev_err(dev, "failed to create PHY\n");
+
+ return ret;
}
phy_set_drvdata(phy, priv);