Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit f23785c

Browse files
nxpfrankligregkh
authored andcommitted
PCI: imx6: Fix missing call to phy_power_off() in error handling
commit 5b04d44 upstream. Fix missing call to phy_power_off() in the error path of imx6_pcie_host_init(). Remove unnecessary check for imx6_pcie->phy as the PHY API already handles NULL pointers. Fixes: cbcf872 ("phy: freescale: imx8m-pcie: Fix the wrong order of phy_init() and phy_power_on()") Link: https://lore.kernel.org/linux-pci/20240729-pci2_upstream-v8-3-b68ee5ef2b4d@nxp.com Signed-off-by: Frank Li <Frank.Li@nxp.com> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Cc: <stable@vger.kernel.org> # 6.1+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b91d041 commit f23785c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/pci/controller/dwc/pci-imx6.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
997997
ret = phy_power_on(imx6_pcie->phy);
998998
if (ret) {
999999
dev_err(dev, "waiting for PHY ready timeout!\n");
1000-
goto err_phy_off;
1000+
goto err_phy_exit;
10011001
}
10021002
}
10031003

@@ -1012,8 +1012,9 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
10121012
return 0;
10131013

10141014
err_phy_off:
1015-
if (imx6_pcie->phy)
1016-
phy_exit(imx6_pcie->phy);
1015+
phy_power_off(imx6_pcie->phy);
1016+
err_phy_exit:
1017+
phy_exit(imx6_pcie->phy);
10171018
err_clk_disable:
10181019
imx6_pcie_clk_disable(imx6_pcie);
10191020
err_reg_disable:

0 commit comments

Comments
 (0)