diff mbox series

wifi: mwifiex: fix uninitialized firmware_stat

Message ID 20231220090135.1028991-1-yu-hao.lin@nxp.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series wifi: mwifiex: fix uninitialized firmware_stat | expand

Commit Message

David Lin Dec. 20, 2023, 9:01 a.m. UTC
Variable firmware_stat is possilbe to be used without initialization.

Signed-off-by: David Lin <yu-hao.lin@nxp.com>
Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/
---
 drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: 783004b6dbda2cfe9a552a4cc9c1d168a2068f6c
prerequisite-patch-id: ee10b03f813ab1e72d05c59aef4e07a26afdf678

Comments

Jeff Johnson Dec. 20, 2023, 11:02 p.m. UTC | #1
On 12/20/2023 1:01 AM, David Lin wrote:
> Variable firmware_stat is possilbe to be used without initialization.

s/possilbe /possible /

Kalle can probably fix when he picks it up
David Lin Dec. 21, 2023, 1:34 a.m. UTC | #2
> From: Jeff Johnson <quic_jjohnson@quicinc.com>
> Sent: Thursday, December 21, 2023 7:03 AM
> To: David Lin <yu-hao.lin@nxp.com>; linux-wireless@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org; briannorris@chromium.org;
> kvalo@kernel.org; francesco@dolcini.it; Pete Hsieh
> <tsung-hsien.hsieh@nxp.com>; stable@vger.kernel.org; kernel test robot
> <lkp@intel.com>; Dan Carpenter <error27@gmail.com>
> Subject: [EXT] Re: [PATCH] wifi: mwifiex: fix uninitialized firmware_stat
> 
> On 12/20/2023 1:01 AM, David Lin wrote:
> > Variable firmware_stat is possilbe to be used without initialization.
> 
> s/possilbe /possible /
> 
> Kalle can probably fix when he picks it up


Sorry. Thanks for your correction.
Brian Norris Dec. 21, 2023, 1:42 a.m. UTC | #3
On Wed, Dec 20, 2023 at 1:02 AM David Lin <yu-hao.lin@nxp.com> wrote:
>
> Variable firmware_stat is possilbe to be used without initialization.
>
> Signed-off-by: David Lin <yu-hao.lin@nxp.com>
> Fixes: 1c5d463c0770 ("wifi: mwifiex: add extra delay for firmware ready")
> Cc: stable@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <error27@gmail.com>
> Closes: https://lore.kernel.org/r/202312192236.ZflaWYCw-lkp@intel.com/

Acked-by: Brian Norris <briannorris@chromium.org>
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index ef3e68d1059c..75f53c2f1e1f 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++) {