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-gxl-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-2-linux.amoon@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Anand Moon and committed by
Vinod Koul
05457917 686b2730

+3 -8
+3 -8
drivers/phy/amlogic/phy-meson-gxl-usb2.c
··· 237 237 struct phy_meson_gxl_usb2_priv *priv; 238 238 struct phy *phy; 239 239 void __iomem *base; 240 - int ret; 241 240 242 241 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 243 242 if (!priv) ··· 265 266 return PTR_ERR(priv->reset); 266 267 267 268 phy = devm_phy_create(dev, NULL, &phy_meson_gxl_usb2_ops); 268 - if (IS_ERR(phy)) { 269 - ret = PTR_ERR(phy); 270 - if (ret != -EPROBE_DEFER) 271 - dev_err(dev, "failed to create PHY\n"); 272 - 273 - return ret; 274 - } 269 + if (IS_ERR(phy)) 270 + return dev_err_probe(dev, PTR_ERR(phy), 271 + "failed to create PHY\n"); 275 272 276 273 phy_set_drvdata(phy, priv); 277 274