diff options
author | Fabrice Gasnier <fabrice.gasnier@foss.st.com> | 2021-10-25 16:31:05 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-11-26 06:56:51 +0100 |
commit | 77ba6e7ffbd8b0afe3e475629d5fcb52e7447405 (patch) | |
tree | 73f1df949e9e31725ecfb797017bac38c00073be /drivers/phy | |
parent | phy: bcm-ns-usb2: improve printing ref clk errors (diff) | |
download | linux-77ba6e7ffbd8b0afe3e475629d5fcb52e7447405.tar.xz linux-77ba6e7ffbd8b0afe3e475629d5fcb52e7447405.zip |
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: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/1635172265-26219-1-git-send-email-fabrice.gasnier@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/st/phy-stm32-usbphyc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c index 7df6a63ad37b..115be0eea0d6 100644 --- a/drivers/phy/st/phy-stm32-usbphyc.c +++ b/drivers/phy/st/phy-stm32-usbphyc.c @@ -672,17 +672,15 @@ static int stm32_usbphyc_probe(struct platform_device *pdev) usbphyc->vdda1v1 = devm_regulator_get(dev, "vdda1v1"); if (IS_ERR(usbphyc->vdda1v1)) { - ret = PTR_ERR(usbphyc->vdda1v1); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get vdda1v1 supply: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v1), + "failed to get vdda1v1 supply\n"); goto clk_disable; } usbphyc->vdda1v8 = devm_regulator_get(dev, "vdda1v8"); if (IS_ERR(usbphyc->vdda1v8)) { - ret = PTR_ERR(usbphyc->vdda1v8); - if (ret != -EPROBE_DEFER) - dev_err(dev, "failed to get vdda1v8 supply: %d\n", ret); + ret = dev_err_probe(dev, PTR_ERR(usbphyc->vdda1v8), + "failed to get vdda1v8 supply\n"); goto clk_disable; } |