qtnfmac: fix uninitialized return code in ret
authorColin Ian King <colin.king@canonical.com>
Wed, 21 Jun 2017 13:25:30 +0000 (14:25 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 28 Jun 2017 17:50:12 +0000 (20:50 +0300)
commit3e3d8aa611076efc945687df30a3abf181989d1d
tree7739945b83e61743afe1e1612741b380f50d4293
parentb90a16854d60f147cc6388dbe3e9765101c5b5a6
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>
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c