PCI: qcom: Fix missing error code in qcom_pcie_probe()

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 <dan.carpenter@linaro.org>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit is contained in:
Dan Carpenter 2024-07-08 13:05:36 -05:00 committed by Krzysztof Wilczyński
parent 5b6272e0ef
commit 101e5c5c4e
No known key found for this signature in database
GPG Key ID: 7C64768D3DE334E7

View File

@ -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 {