wifi: p54: add missing parentheses in p54_flush()
authorRustam Subkhankulov <subkhankulov@ispras.ru>
Thu, 14 Jul 2022 13:48:31 +0000 (16:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:32 +0000 (14:23 +0200)
commit4388ea6803465af5c4bd4860b4d9e7e7d929945a
tree0e125140fdf43b125b38108b851dbefa0fa4fc10
parent71fc0615c91e0dee1564d2da1bcf34ec056324e7
wifi: p54: add missing parentheses in p54_flush()

[ Upstream commit bcfd9d7f6840b06d5988c7141127795cf405805e ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intersil/p54/main.c