diff mbox series

phy: freescale: imx8m-pcie: Add one missing error return

Message ID 1671433941-2037-1-git-send-email-hongxing.zhu@nxp.com
State New
Headers show
Series phy: freescale: imx8m-pcie: Add one missing error return | expand

Commit Message

Hongxing Zhu Dec. 19, 2022, 7:12 a.m. UTC
There should be one error return when fail to fetch the perst reset.
Add the missing error return.

Fixes: dce9edff16ee ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support")

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
---
 drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut Dec. 19, 2022, 7:36 a.m. UTC | #1
On 12/19/22 08:12, Richard Zhu wrote:
> There should be one error return when fail to fetch the perst reset.
> Add the missing error return.
> 
> Fixes: dce9edff16ee ("phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support")
> 
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>

Reviewed-by: Marek Vasut <marex@denx.de>

> ---
>   drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
> index 7585e8080b77..afc63552ecaf 100644
> --- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
> +++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
> @@ -255,7 +255,7 @@ static int imx8_pcie_phy_probe(struct platform_device *pdev)
>   		imx8_phy->perst =
>   			devm_reset_control_get_exclusive(dev, "perst");
>   		if (IS_ERR(imx8_phy->perst))
> -			dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
> +			return dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
>   				      "Failed to get PCIE PHY PERST control\n");
>   	}

Thanks !
Vinod Koul Jan. 13, 2023, 5:55 p.m. UTC | #2
On 19-12-22, 15:12, Richard Zhu wrote:
> There should be one error return when fail to fetch the perst reset.
> Add the missing error return.

Applied, thanks
diff mbox series

Patch

diff --git a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
index 7585e8080b77..afc63552ecaf 100644
--- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
+++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c
@@ -255,7 +255,7 @@  static int imx8_pcie_phy_probe(struct platform_device *pdev)
 		imx8_phy->perst =
 			devm_reset_control_get_exclusive(dev, "perst");
 		if (IS_ERR(imx8_phy->perst))
-			dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
+			return dev_err_probe(dev, PTR_ERR(imx8_phy->perst),
 				      "Failed to get PCIE PHY PERST control\n");
 	}