"iter" is -1 at the end of the loop and not zero. It means we don't
print a warning message.
Signed-off-by: Dan Carpenter <[email protected]>
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 48687f1..4544e8c 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -985,7 +985,7 @@ int __wil_down(struct wil6210_priv *wil)
}
mutex_lock(&wil->mutex);
- if (!iter)
+ if (iter < 0)
wil_err(wil, "timeout waiting for idle FW/HW\n");
wil_reset(wil, false);
Dan Carpenter <[email protected]> writes:
> "iter" is -1 at the end of the loop and not zero. It means we don't
> print a warning message.
>
> Signed-off-by: Dan Carpenter <[email protected]>
Applied to ath.git, thanks.
--
Kalle Valo
Acked-by: Maya Erez <[email protected]>
-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Wednesday, December 16, 2015 1:10 PM
To: qca_merez
Cc: Kalle Valo; [email protected]; wil6210; [email protected]
Subject: [patch] wil6210: fix a warning message condition
"iter" is -1 at the end of the loop and not zero. It means we don't print a warning message.
Signed-off-by: Dan Carpenter <[email protected]>
diff --git a/drivers/net/wireless/ath/wil6210/main.c b/drivers/net/wireless/ath/wil6210/main.c
index 48687f1..4544e8c 100644
--- a/drivers/net/wireless/ath/wil6210/main.c
+++ b/drivers/net/wireless/ath/wil6210/main.c
@@ -985,7 +985,7 @@ int __wil_down(struct wil6210_priv *wil)
}
mutex_lock(&wil->mutex);
- if (!iter)
+ if (iter < 0)
wil_err(wil, "timeout waiting for idle FW/HW\n");
wil_reset(wil, false);