From: Marco Felsch <m.felsch@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle
Date: Wed, 6 Jul 2022 16:21:03 +0200 [thread overview]
Message-ID: <20220706142105.2266956-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20220706142105.2266956-1-m.felsch@pengutronix.de>
Don't return -ENODEV if of_phy_provider_lookup() fails instead propagate
the error. So errors like -EPROBE_DEFER are propagated correctly.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/phy/phy-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index ef7bd76648..8a57bd1aa9 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -317,7 +317,7 @@ struct phy *of_phy_get_by_phandle(struct device_d *dev, const char *phandle,
phy_provider = of_phy_provider_lookup(np);
if (IS_ERR(phy_provider)) {
- return ERR_PTR(-ENODEV);
+ return ERR_CAST(phy_provider);
}
return phy_provider->of_xlate(phy_provider->dev, NULL);
--
2.30.2
next prev parent reply other threads:[~2022-07-06 14:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 14:21 [PATCH 0/4] MX8MN-EVK DDR4 Support Marco Felsch
2022-07-06 14:21 ` [PATCH 1/4] phy: fix deep probe support Marco Felsch
2022-07-07 14:39 ` Johannes Zink
2022-07-06 14:21 ` Marco Felsch [this message]
2022-07-07 14:39 ` [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle Johannes Zink
2022-07-06 14:21 ` [PATCH 3/4] usb: chipidea: imx: call enable_clk after all resources are requested Marco Felsch
2022-07-07 14:40 ` Johannes Zink
2022-07-06 14:21 ` [PATCH 4/4] ARM: i.MX8MN: pass along correct DT depending on variant Marco Felsch
2022-07-11 9:22 ` [PATCH 0/4] MX8MN-EVK DDR4 Support Sascha Hauer
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=20220706142105.2266956-3-m.felsch@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=barebox@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