From 101e5c5c4e766901492b51c33b34af5f775b043f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 8 Jul 2024 13:05:36 -0500 Subject: PCI: qcom: Fix missing error code in qcom_pcie_probe() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return a negative error code if dev_pm_opp_find_freq_floor() fails; don't return success. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-2-dan.carpenter@linaro.org Signed-off-by: Dan Carpenter Signed-off-by: Krzysztof WilczyƄski Signed-off-by: Bjorn Helgaas Tested-by: Anders Roxell Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index c8cbfb91e1d5..067ccb9cc6d0 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1578,7 +1578,8 @@ static int qcom_pcie_probe(struct platform_device *pdev) if (!ret) { opp = dev_pm_opp_find_freq_floor(dev, &max_freq); if (IS_ERR(opp)) { - dev_err_probe(pci->dev, PTR_ERR(opp), + ret = PTR_ERR(opp); + dev_err_probe(pci->dev, ret, "Unable to find max freq OPP\n"); goto err_pm_runtime_put; } else { -- cgit