Skip to content

Commit 9bff4ef

Browse files
moonlinuxvinodkoul
authored andcommitted
phy: amlogic: phy-meson-g12a-usb2: 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 0545791 commit 9bff4ef

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/phy/amlogic/phy-meson-g12a-usb2.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,9 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev)
339339
return ret;
340340

341341
phy = devm_phy_create(dev, NULL, &phy_meson_g12a_usb2_ops);
342-
if (IS_ERR(phy)) {
343-
ret = PTR_ERR(phy);
344-
if (ret != -EPROBE_DEFER)
345-
dev_err(dev, "failed to create PHY\n");
346-
347-
return ret;
348-
}
342+
if (IS_ERR(phy))
343+
return dev_err_probe(dev, PTR_ERR(phy),
344+
"failed to create PHY\n");
349345

350346
phy_set_bus_width(phy, 8);
351347
phy_set_drvdata(phy, priv);

0 commit comments

Comments
 (0)