diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-06-21 16:25:30 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-28 20:50:12 +0300 |
commit | 3e3d8aa611076efc945687df30a3abf181989d1d (patch) | |
tree | 7739945b83e61743afe1e1612741b380f50d4293 /drivers/net/wireless/quantenna | |
parent | b90a16854d60f147cc6388dbe3e9765101c5b5a6 (diff) | |
download | linux-3e3d8aa611076efc945687df30a3abf181989d1d.tar.xz |
qtnfmac: fix uninitialized return code in ret
The return value ret is unitialized and garbage is being returned
for the three different error conditions when setting up the PCIe
BARs. Fix this by initializing ret to -ENOMEM to indicate that
the BARs failed to be setup correctly.
Detected by CoverityScan, CID#1437563 ("Unitialized scalar variable")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c index f93b27f3a236..7fc4f0d6a9ad 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c +++ b/drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c @@ -247,7 +247,7 @@ static void qtnf_pcie_free_shm_ipc(struct qtnf_pcie_bus_priv *priv) static int qtnf_pcie_init_memory(struct qtnf_pcie_bus_priv *priv) { - int ret; + int ret = -ENOMEM; priv->sysctl_bar = qtnf_map_bar(priv, QTN_SYSCTL_BAR); if (IS_ERR_OR_NULL(priv->sysctl_bar)) { |