]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wil6210: fix break that is never reached because of zero'ing of a retry counter
authorColin Ian King <colin.king@canonical.com>
Fri, 15 Nov 2019 12:09:53 +0000 (12:09 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Feb 2020 07:36:22 +0000 (08:36 +0100)
commit3deb6e993ec44116fb0f398c3910958c946325e6
tree430b6542f0a8045dd97a614e6653b0f8ba49c1cd
parent281ebbcdee49c5c9331aac157718b875cce210f0
wil6210: fix break that is never reached because of zero'ing of a retry counter

[ Upstream commit 5b1413f00b5beb9f5fed94e43ea0c497d5db9633 ]

There is a check on the retry counter invalid_buf_id_retry that is always
false because invalid_buf_id_retry is initialized to zero on each iteration
of a while-loop.  Fix this by initializing the retry counter before the
while-loop starts.

Addresses-Coverity: ("Logically dead code")
Fixes: b4a967b7d0f5 ("wil6210: reset buff id in status message after completion")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/wil6210/txrx_edma.c