From: David Lin Date: Thu, 21 Dec 2023 01:55:11 +0000 (+0800) Subject: wifi: mwifiex: fix uninitialized firmware_stat X-Git-Tag: v6.6.14~166 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c84a711ad62260867e3cc8d0524409dc9b755336;p=thirdparty%2Fkernel%2Fstable.git wifi: mwifiex: fix uninitialized firmware_stat commit 3df95e265924ac898c1a38a0c01846dd0bd3b354 upstream. Variable firmware_stat is possible to be used without initialization. Signed-off-by: David Lin Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready") Cc: stable@vger.kernel.org Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/ Acked-by: Brian Norris Signed-off-by: Kalle Valo Link: https://msgid.link/20231221015511.1032128-1-yu-hao.lin@nxp.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 85628fbb5e2a2..e66ba0d156f85 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -779,7 +779,7 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter, { struct sdio_mmc_card *card = adapter->card; int ret = 0; - u16 firmware_stat; + u16 firmware_stat = 0; u32 tries; for (tries = 0; tries < poll_num; tries++) {