mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: martin.blumenstingl@googlemail.com (Martin Blumenstingl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH 4/5] phy: amlogic: phy-meson-gxl-usb2: don't log an error on -EPROBE_DEFER
Date: Sun, 28 Jan 2018 21:22:44 +0100	[thread overview]
Message-ID: <20180128202245.25021-5-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20180128202245.25021-1-martin.blumenstingl@googlemail.com>

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>
---
 drivers/phy/amlogic/phy-meson-gxl-usb2.c | 8 ++++++--
 1 file 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 ee3c2c0c8572..f062fc7f0a3a 100644
--- a/drivers/phy/amlogic/phy-meson-gxl-usb2.c
+++ b/drivers/phy/amlogic/phy-meson-gxl-usb2.c
@@ -240,6 +240,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)
@@ -275,8 +276,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);
-- 
2.16.1

  parent reply	other threads:[~2018-01-28 20:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-28 20:22 [PATCH 0/5] improvements and fixes for the phy-meson-gxl-usb2 driver Martin Blumenstingl
2018-01-28 20:22 ` [PATCH 1/5] dt-bindings: phy: meson-gxl-usb2-phy: add the reset line and clock Martin Blumenstingl
2018-02-05  6:07   ` Rob Herring
2018-01-28 20:22 ` [PATCH 2/5] phy: amlogic: phy-meson-gxl-usb2: support the clock and reset line Martin Blumenstingl
2018-01-28 20:22 ` [PATCH 3/5] phy: amlogic: phy-meson-gxl-usb2: default to host mode Martin Blumenstingl
2018-01-28 20:22 ` Martin Blumenstingl [this message]
2018-01-28 20:22 ` [PATCH 5/5] phy: amlogic: phy-meson-gxl-usb2: rename some of the U2P_R2 registers Martin Blumenstingl
2018-02-09  8:27 ` [PATCH 0/5] improvements and fixes for the phy-meson-gxl-usb2 driver Yixun Lan
2018-02-11 21:18   ` Martin Blumenstingl
2018-02-16 12:21 ` Kishon Vijay Abraham I

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180128202245.25021-5-martin.blumenstingl@googlemail.com \
    --to=martin.blumenstingl@googlemail.com \
    --cc=linus-amlogic@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®