]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:17:44 +0000 (11:17 +0200)
commite5479e38d90fc45e4894aace49c1237cb037a319
tree868065dcb8f586370bc10dd6f55876a74e29e0af
parente9e0ba4d900d2c2b9cca5a584ea37ac2ea9526ce
wifi: p54: add missing parentheses in p54_flush()

[ Upstream commit e081b3e2ff51d47b7850114b437be4d3231f7862 ]

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