All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: mwifiex: fix SDIO firmware dump wait
@ 2023-09-20 11:22 Dmitry Antipov
  2023-09-20 23:15 ` Brian Norris
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Antipov @ 2023-09-20 11:22 UTC (permalink / raw)
  To: Brian Norris; +Cc: Kalle Valo, linux-wireless, lvc-project, Dmitry Antipov

In 'mwifiex_sdio_generic_fw_dump()', move (presumably placed
by mistake) 'if (tries == MAX_POLL_TRIES)' check to an outer
waiting loop.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/marvell/mwifiex/sdio.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index 774858cfe86f..98f16eb8f298 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -2899,12 +2899,12 @@ static void mwifiex_sdio_generic_fw_dump(struct mwifiex_adapter *adapter)
 			}
 			if (start_flag == 0)
 				break;
-			if (tries == MAX_POLL_TRIES) {
-				mwifiex_dbg(adapter, ERROR,
-					    "FW not ready to dump\n");
-				ret = -1;
-				goto done;
-			}
+		}
+		if (tries == MAX_POLL_TRIES) {
+			mwifiex_dbg(adapter, ERROR,
+				    "FW not ready to dump\n");
+			ret = -1;
+			goto done;
 		}
 		usleep_range(100, 200);
 	}
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-23  1:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 11:22 [PATCH] wifi: mwifiex: fix SDIO firmware dump wait Dmitry Antipov
2023-09-20 23:15 ` Brian Norris
2023-09-21  9:22   ` Dmitry Antipov
2023-09-21 12:12     ` Kalle Valo
2023-09-23  1:39       ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.