* [PATCH stable-4.9] PCI: qcom: Fix unbalanced PHY init on probe errors
@ 2022-06-10 12:04 Johan Hovold
2022-06-13 9:23 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2022-06-10 12:04 UTC (permalink / raw)
To: stable
Cc: linux-arm-msm, linux-pci, linux-kernel, Johan Hovold,
Lorenzo Pieralisi, Bjorn Helgaas, Manivannan Sadhasivam,
Stanimir Varbanov
commit 83013631f0f9961416abd812e228c8efbc2f6069 upstream.
Undo the PHY initialisation (e.g. balance runtime PM) if host
initialisation fails during probe.
Link: https://lore.kernel.org/r/20220401133854.10421-3-johan+linaro@kernel.org
Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Cc: stable@vger.kernel.org # 4.5
[ johan: adjust context to 4.9 ]
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/pci/host/pcie-qcom.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-qcom.c b/drivers/pci/host/pcie-qcom.c
index aeb46f8c7087..4e21ca3c067e 100644
--- a/drivers/pci/host/pcie-qcom.c
+++ b/drivers/pci/host/pcie-qcom.c
@@ -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[] = {
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH stable-4.9] PCI: qcom: Fix unbalanced PHY init on probe errors
2022-06-10 12:04 [PATCH stable-4.9] PCI: qcom: Fix unbalanced PHY init on probe errors Johan Hovold
@ 2022-06-13 9:23 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2022-06-13 9:23 UTC (permalink / raw)
To: Johan Hovold
Cc: stable, linux-arm-msm, linux-pci, linux-kernel,
Lorenzo Pieralisi, Bjorn Helgaas, Manivannan Sadhasivam,
Stanimir Varbanov
On Fri, Jun 10, 2022 at 02:04:11PM +0200, Johan Hovold wrote:
> commit 83013631f0f9961416abd812e228c8efbc2f6069 upstream.
>
> Undo the PHY initialisation (e.g. balance runtime PM) if host
> initialisation fails during probe.
>
> Link: https://lore.kernel.org/r/20220401133854.10421-3-johan+linaro@kernel.org
> Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver")
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
> Cc: stable@vger.kernel.org # 4.5
> [ johan: adjust context to 4.9 ]
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> drivers/pci/host/pcie-qcom.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
All now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-13 9:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-10 12:04 [PATCH stable-4.9] PCI: qcom: Fix unbalanced PHY init on probe errors Johan Hovold
2022-06-13 9:23 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).