Commit 77ba6e7f authored by Fabrice Gasnier's avatar Fabrice Gasnier Committed by Vinod Koul

phy: stm32: adopt dev_err_probe for regulators

Change stm32-usbphyc driver to use dev_err_probe(), to benefit of
devices_deferred debugfs in case of probe deferral.
Signed-off-by: default avatarFabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: default avatarAmelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/1635172265-26219-1-git-send-email-fabrice.gasnier@foss.st.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 97ba12d3
...@@ -672,17 +672,15 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) ...@@ -672,17 +672,15 @@ static int stm32_usbphyc_probe(struct platform_device *pdev)
usbphyc->vdda1v1 = devm_regulator_get(dev, "vdda1v1"); usbphyc->vdda1v1 = devm_regulator_get(dev, "vdda1v1");
if (IS_ERR(usbphyc->vdda1v1)) { if (IS_ERR(usbphyc->vdda1v1)) {
ret = PTR_ERR(usbphyc->vdda1v1); ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v1),
if (ret != -EPROBE_DEFER) "failed to get vdda1v1 supply\n");
dev_err(dev, "failed to get vdda1v1 supply: %d\n", ret);
goto clk_disable; goto clk_disable;
} }
usbphyc->vdda1v8 = devm_regulator_get(dev, "vdda1v8"); usbphyc->vdda1v8 = devm_regulator_get(dev, "vdda1v8");
if (IS_ERR(usbphyc->vdda1v8)) { if (IS_ERR(usbphyc->vdda1v8)) {
ret = PTR_ERR(usbphyc->vdda1v8); ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v8),
if (ret != -EPROBE_DEFER) "failed to get vdda1v8 supply\n");
dev_err(dev, "failed to get vdda1v8 supply: %d\n", ret);
goto clk_disable; goto clk_disable;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment