diff options
author | Anand Moon <linux.amoon@gmail.com> | 2025-04-10 19:03:17 +0530 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2025-04-11 17:07:15 +0530 |
commit | 9bff4ef29a6409850c27df705da54277a8e836f2 (patch) | |
tree | fe59dba84cd54dcff7da45e6a8448a13b3ec4910 | |
parent | 05457917e50c3d6bf75d2e3b99c7e6709a4a6844 (diff) |
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 <linux.amoon@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250410133332.294556-3-linux.amoon@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/phy/amlogic/phy-meson-g12a-usb2.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/phy/amlogic/phy-meson-g12a-usb2.c b/drivers/phy/amlogic/phy-meson-g12a-usb2.c index 0e0b5c00b676..66bf0b7ef8ed 100644 --- a/drivers/phy/amlogic/phy-meson-g12a-usb2.c +++ b/drivers/phy/amlogic/phy-meson-g12a-usb2.c @@ -339,13 +339,9 @@ static int phy_meson_g12a_usb2_probe(struct platform_device *pdev) return ret; phy = devm_phy_create(dev, NULL, &phy_meson_g12a_usb2_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_bus_width(phy, 8); phy_set_drvdata(phy, priv); |