phy: fsl-imx8mq-usb: add dev_err_probe if getting vbus failed
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Wed, 16 Aug 2023 08:02:56 +0000 (10:02 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 22 Aug 2023 13:58:11 +0000 (19:28 +0530)
This adds an error message if getting vbus failed for some reason,
-EPROBE_DEFER is handled appropriately as well and adds a nice
information to debugfs.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20230816080256.611380-1-alexander.stein@ew.tq-group.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/freescale/phy-fsl-imx8mq-usb.c

index e1d769402696310b8d1ae000e1f1c97fb7d21f79..0b9a59d5b8f023a698d0a0078274d18d17c9a36e 100644 (file)
@@ -394,7 +394,7 @@ static int imx8mq_usb_phy_probe(struct platform_device *pdev)
 
        imx_phy->vbus = devm_regulator_get(dev, "vbus");
        if (IS_ERR(imx_phy->vbus))
-               return PTR_ERR(imx_phy->vbus);
+               return dev_err_probe(dev, PTR_ERR(imx_phy->vbus), "failed to get vbus\n");
 
        phy_set_drvdata(imx_phy->phy, imx_phy);