summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnand Moon <linux.amoon@gmail.com>2025-04-10 19:03:19 +0530
committerVinod Koul <vkoul@kernel.org>2025-04-11 17:07:15 +0530
commita77e2e899841937798bff0924c03d4d0e4963aa3 (patch)
tree663b28787e1fb3d5e55399b5ec5a183ca2d27b4e
parentde39730f9258e9984892c0af68a3e884ad19acea (diff)
phy: amlogic: phy-meson-axg-mipi-dphy: Simplify error handling with dev_err_probe()
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> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20250410133332.294556-5-linux.amoon@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
index 08a86962d949..c4a56b9d3289 100644
--- a/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
+++ b/drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c
@@ -377,13 +377,9 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
return ret;
phy = devm_phy_create(dev, NULL, &phy_meson_axg_mipi_dphy_ops);
- if (IS_ERR(phy)) {
- ret = PTR_ERR(phy);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "failed to create PHY\n");
-
- return ret;
- }
+ if (IS_ERR(phy))
+ return dev_err_probe(dev, PTR_ERR(phy),
+ "failed to create PHY\n");
phy_set_drvdata(phy, priv);