PCI: qcom: Fix unbalanced PHY init on probe errors
Subsystems (3)
PATCH 1/1 PCI: qcom: Fix unbalanced PHY init on probe errors
commit 83013631f0f9961416abd812e228c8efbc2f6069 upstream.
Undo the PHY initialisation (e.g. balance runtime PM) if host initialisation fails during probe.
Fixes 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
Signed-off-by Johan Hovold <[email protected]>
Signed-off-by Lorenzo Pieralisi <[email protected]>
Signed-off-by Bjorn Helgaas <[email protected]>
Reviewed-by Manivannan Sadhasivam <[email protected]>
Cc [email protected] # 4.5
[ johan: adjust context to 4.9 ]
Signed-off-by Johan Hovold <[email protected]>
--- drivers/pci/host/pcie-qcom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pci/host/pcie-qcom.c +6 -1
@@ -562,10 +562,15 @@ static int qcom_pcie_probe(struct platform_device *pdev) ret =dw_pcie_host_init (pp);if (ret) {dev_err (dev,"cannot initialize host\n" ); -return ret; + goto err_phy_exit; }return 0 ; + +err_phy_exit: +phy_exit (pcie->phy); + +return ret; }static const struct of_device_id qcom_pcie_match[] = {
Signature · 1 line
2.35.1
Greg KH
maintainerQuoted 15 lines · Johan Hovold
commit
83013631f0f9961416abd812e228c8efbc2f6069upstream.Undo the PHY initialisation (e.g. balance runtime PM) if host initialisation fails during probe.
Fixes 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")Signed-off-by Johan Hovold <[email protected]>Signed-off-by Lorenzo Pieralisi <[email protected]>Signed-off-by Bjorn Helgaas <[email protected]>Reviewed-by Manivannan Sadhasivam <[email protected]>Cc [email protected] # 4.5[ johan: adjust context to 4.9 ]Signed-off-by Johan Hovold <[email protected]>
Quoted 3 lines
--- drivers/pci/host/pcie-qcom.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
All now queued up, thanks.
greg k-h