]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: fix uninitialized variable access in pcie_remove
authorArnd Bergmann <arnd@arndb.de>
Fri, 13 Jan 2017 15:35:03 +0000 (16:35 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 17 Jan 2017 11:54:57 +0000 (13:54 +0200)
commitc3e1a6daa00c6481519e303a2c469e3d69ba2f0f
tree29f9fcbf48871c1c807d28c7f5453f0cee0b99f5
parent346243c42a1e0abd901321241e2e2b133a0e5daf
mwifiex: fix uninitialized variable access in pcie_remove

Checking the firmware status from PCIe register only works
if the register is available, otherwise we end up with
random behavior:

drivers/net/wireless/marvell/mwifiex/pcie.c: In function 'mwifiex_pcie_remove':
drivers/net/wireless/marvell/mwifiex/pcie.c:585:5: error: 'fw_status' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This makes sure we treat the absence of the register as a failure.

Fixes: 85450f0bbedb ("mwifiex: get rid of global user_rmmod flag")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/pcie.c