From: Anand Moon <linux.amoon@gmail.com>
To: Vinod Koul <vkoul@kernel.org>,
Kishon Vijay Abraham I <kishon@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-phy@lists.infradead.org (open list:GENERIC PHY FRAMEWORK),
linux-arm-kernel@lists.infradead.org (moderated list:ARM/Amlogic
Meson SoC support),
linux-amlogic@lists.infradead.org (open list:ARM/Amlogic Meson
SoC support), linux-kernel@vger.kernel.org (open list)
Cc: Anand Moon <linux.amoon@gmail.com>
Subject: [PATCH v1 5/6] phy: amlogic: phy-meson-axg-pcie: Simplify error handling with dev_err_probe()
Date: Thu, 10 Apr 2025 19:03:20 +0530 [thread overview]
Message-ID: <20250410133332.294556-6-linux.amoon@gmail.com> (raw)
In-Reply-To: <20250410133332.294556-1-linux.amoon@gmail.com>
Use dev_err_probe() for phy resources to indicate the deferral
reason when waiting for the resource to come up.
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
drivers/phy/amlogic/phy-meson-axg-pcie.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/phy/amlogic/phy-meson-axg-pcie.c b/drivers/phy/amlogic/phy-meson-axg-pcie.c
index 60be5cdc600b3..54baf7b8930e1 100644
--- a/drivers/phy/amlogic/phy-meson-axg-pcie.c
+++ b/drivers/phy/amlogic/phy-meson-axg-pcie.c
@@ -131,19 +131,15 @@ static int phy_axg_pcie_probe(struct platform_device *pdev)
struct phy_axg_pcie_priv *priv;
struct device_node *np = dev->of_node;
void __iomem *base;
- int ret;
priv = devm_kmalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
priv->phy = devm_phy_create(dev, np, &phy_axg_pcie_ops);
- if (IS_ERR(priv->phy)) {
- ret = PTR_ERR(priv->phy);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "failed to create PHY\n");
- return ret;
- }
+ if (IS_ERR(priv->phy))
+ return dev_err_probe(dev, PTR_ERR(priv->phy),
+ "failed to create PHY\n");
base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
--
2.49.0
next prev parent reply other threads:[~2025-04-10 13:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 13:33 [PATCH v1 0/6] Messon: Simplify error handling with dev_err_probe() Anand Moon
2025-04-10 13:33 ` [PATCH v1 1/6] phy: amlogic: phy-meson-gxl-usb2: " Anand Moon
2025-04-11 8:32 ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 2/6] phy: amlogic: phy-meson-g12a-usb2: " Anand Moon
2025-04-11 8:32 ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 3/6] phy: amlogic: phy-meson-axg-mipi-pcie-analog: " Anand Moon
2025-04-11 8:32 ` Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 4/6] phy: amlogic: phy-meson-axg-mipi-dphy: " Anand Moon
2025-04-11 8:32 ` Neil Armstrong
2025-04-10 13:33 ` Anand Moon [this message]
2025-04-11 8:32 ` [PATCH v1 5/6] phy: amlogic: phy-meson-axg-pcie: " Neil Armstrong
2025-04-10 13:33 ` [PATCH v1 6/6] phy: amlogic: phy-meson-axg-pcie: Fix PHY creation order in axg-pcie probe Anand Moon
2025-04-11 8:33 ` Neil Armstrong
2025-04-11 12:11 ` [PATCH v1 0/6] Messon: Simplify error handling with dev_err_probe() Vinod Koul
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=20250410133332.294556-6-linux.amoon@gmail.com \
--to=linux.amoon@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=kishon@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=vkoul@kernel.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;
as well as URLs for NNTP newsgroup(s).