Skip to content

Commit a77e2e8

Browse files
moonlinuxvinodkoul
authored andcommitted
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 <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent de39730 commit a77e2e8

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/phy/amlogic/phy-meson-axg-mipi-dphy.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,9 @@ static int phy_meson_axg_mipi_dphy_probe(struct platform_device *pdev)
377377
return ret;
378378

379379
phy = devm_phy_create(dev, NULL, &phy_meson_axg_mipi_dphy_ops);
380-
if (IS_ERR(phy)) {
381-
ret = PTR_ERR(phy);
382-
if (ret != -EPROBE_DEFER)
383-
dev_err(dev, "failed to create PHY\n");
384-
385-
return ret;
386-
}
380+
if (IS_ERR(phy))
381+
return dev_err_probe(dev, PTR_ERR(phy),
382+
"failed to create PHY\n");
387383

388384
phy_set_drvdata(phy, priv);
389385

0 commit comments

Comments
 (0)