提交 a30b73c2 编写于 作者: J Johan Hovold 提交者: Zheng Zengkai

PCI: qcom: Fix unbalanced PHY init on probe errors

stable inclusion
from stable-v5.10.121
commit 99fd821f567e169d9e7254d00cbb305d1be4842c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5L6CQ

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=99fd821f567e169d9e7254d00cbb305d1be4842c

--------------------------------

commit 83013631 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: 82a82383 ("PCI: qcom: Add Qualcomm PCIe controller driver")
Signed-off-by: NJohan Hovold <johan+linaro@kernel.org>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: NManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: NStanimir Varbanov <svarbanov@mm-sol.com>
Cc: stable@vger.kernel.org      # 4.5
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
上级 d66a59f3
...@@ -1451,11 +1451,13 @@ static int qcom_pcie_probe(struct platform_device *pdev) ...@@ -1451,11 +1451,13 @@ static int qcom_pcie_probe(struct platform_device *pdev)
ret = dw_pcie_host_init(pp); ret = dw_pcie_host_init(pp);
if (ret) { if (ret) {
dev_err(dev, "cannot initialize host\n"); dev_err(dev, "cannot initialize host\n");
goto err_pm_runtime_put; goto err_phy_exit;
} }
return 0; return 0;
err_phy_exit:
phy_exit(pcie->phy);
err_pm_runtime_put: err_pm_runtime_put:
pm_runtime_put(dev); pm_runtime_put(dev);
pm_runtime_disable(dev); pm_runtime_disable(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册