]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: p54: add missing parentheses in p54_flush()
authorRustam Subkhankulov <subkhankulov@ispras.ru>
Thu, 14 Jul 2022 13:48:31 +0000 (16:48 +0300)
committerKalle Valo <kvalo@kernel.org>
Mon, 18 Jul 2022 11:54:50 +0000 (14:54 +0300)
commit58ac91e3d513d5974165a3a97c80968ef0fc69e4
treeb04cc4669b41a1963778e2d1466d47f4d8da9b69
parent766353ee6e235bda3b957ecc29ee9a751d601e2c
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: 4001ef149761 ("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
drivers/net/wireless/intersil/p54/main.c