summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intersil
diff options
context:
space:
mode:
authorRustam Subkhankulov <subkhankulov@ispras.ru>2022-07-14 16:48:31 +0300
committerKalle Valo <kvalo@kernel.org>2022-07-18 14:54:50 +0300
commitbcfd9d7f6840b06d5988c7141127795cf405805e (patch)
treeb04cc4669b41a1963778e2d1466d47f4d8da9b69 /drivers/net/wireless/intersil
parent68204a696505fe97150d498f32e38c2a926c540f (diff)
wifi: p54: add missing parentheses in p54_flush()
The assignment of the value to the variable total in the loop condition must be enclosed in additional parentheses, since otherwise, in accordance with the precedence of the operators, the conjunction will be performed first, and only then the assignment. Due to this error, a warning later in the function after the loop may not occur in the situation when it should. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Rustam Subkhankulov <subkhankulov@ispras.ru> Fixes: 0d4171e2153b ("p54: implement flush callback") Acked-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220714134831.106004-1-subkhankulov@ispras.ru
Diffstat (limited to 'drivers/net/wireless/intersil')
-rw-r--r--drivers/net/wireless/intersil/p54/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c
index 26b28d4d680f..b925e327e091 100644
--- a/drivers/net/wireless/intersil/p54/main.c
+++ b/drivers/net/wireless/intersil/p54/main.c
@@ -683,7 +683,7 @@ static void p54_flush(struct ieee80211_hw *dev, struct ieee80211_vif *vif,
* queues have already been stopped and no new frames can sneak
* up from behind.
*/
- while ((total = p54_flush_count(priv) && i--)) {
+ while ((total = p54_flush_count(priv)) && i--) {
/* waste time */
msleep(20);
}