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: 78b5f6f ("PCI: qcom: Add OPP support to scale performance") Link: https://lore.kernel.org/linux-pci/[email protected] Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Krzysztof Wilczyński <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Anders Roxell <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]>
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)