[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240708180539.1447307-4-dan.carpenter@linaro.org>
Date: Mon, 8 Jul 2024 13:05:38 -0500
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Krishna chaitanya chundru <quic_krichai@...cinc.com>
Cc: Dan Carpenter <dan.carpenter@...aro.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof WilczyĆski <kw@...ux.com>,
Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
linux-pci@...r.kernel.org,
linux-arm-msm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] PCI: qcom: Potential uninitialized variable 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")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
drivers/pci/controller/dwc/pcie-qcom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index e06c4ad3a72a..74e2acf4ae11 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1633,7 +1633,7 @@ static int qcom_pcie_probe(struct platform_device *pdev)
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
--
2.43.0
Powered by blists - more mailing lists