Skip to content

Commit 044b45b

Browse files
Dan Carpenterkwilczynski
authored andcommitted
PCI: qcom: Prevent use of uninitialized data in qcom_pcie_suspend_noirq()
Smatch complains that "ret" could be uninitialized if "pcie->icc_mem" is NULL and "pm_suspend_target_state == PM_SUSPEND_MEM". Silence this warning by initializing ret to zero. Fixes: 78b5f6f8855e ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/20240708180539.1447307-4-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>
1 parent 9553636 commit 044b45b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1637,7 +1637,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
16371637
static int qcom_pcie_suspend_noirq(struct device *dev)
16381638
{
16391639
struct qcom_pcie *pcie = dev_get_drvdata(dev);
1640-
int ret;
1640+
int ret = 0;
16411641

16421642
/*
16431643
* Set minimum bandwidth required to keep data path functional during

0 commit comments

Comments
 (0)