]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
phy: freescale: imx8m-pcie: Add one missing error return
authorRichard Zhu <hongxing.zhu@nxp.com>
Mon, 19 Dec 2022 07:12:21 +0000 (15:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:47:10 +0000 (07:47 +0200)
commit b574baa64cf84e7793fe79f4491ae36c16e65a0b upstream.

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>
Link: https://lore.kernel.org/r/1671433941-2037-1-git-send-email-hongxing.zhu@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/freescale/phy-fsl-imx8m-pcie.c

index eaaa5ee750b727d7db33c02bbdbb14aeee39dcbf..4f334ac5a7a9c635754b9711582c3ac8fa3f0dba 100644 (file)
@@ -271,7 +271,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");
        }