Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Anand Moon and committed by
Vinod Koul
9bff4ef2 05457917

+3 -7
+3 -7
drivers/phy/amlogic/phy-meson-g12a-usb2.c
··· 339 339 return ret; 340 340 341 341 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"); 349 345 350 346 phy_set_bus_width(phy, 8); 351 347 phy_set_drvdata(phy, priv);