aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2024-07-08 13:05:38 -0500
committerKrzysztof Wilczyński <[email protected]>2024-07-10 05:39:15 +0000
commit044b45be04cb16125a0eccba532e88dc529f64de (patch)
tree23715c931d56248fb026b57ab5c9fa867ccc326d
parent9553636b5757789536d0d23c83e7fba11812f958 (diff)
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/[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]>
-rw-r--r--drivers/pci/controller/dwc/pcie-qcom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 5973df2238b0..e60432b238fb 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1637,7 +1637,7 @@ err_pm_runtime_put:
static int qcom_pcie_suspend_noirq(struct device *dev)
{
struct qcom_pcie *pcie = dev_get_drvdata(dev);
- int ret;
+ int ret = 0;
/*
* Set minimum bandwidth required to keep data path functional during