rtlwifi: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 24 Mar 2022 07:21:24 +0000 (08:21 +0100)
committerKalle Valo <kvalo@kernel.org>
Wed, 6 Apr 2022 12:11:58 +0000 (15:11 +0300)
commita0ff2a87194a968b9547fd4d824a09092171d1ea
tree90ace3d8d4dcb590a209e3bd94963f332175ceec
parent92cadedd9d5f4355d8ca2765f2259708f0e5592c
rtlwifi: replace usage of found with dedicated list iterator variable

To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.

To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].

This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220324072124.62458-1-jakobkoschel@gmail.com
drivers/net/wireless/realtek/rtlwifi/base.c
drivers/net/wireless/realtek/rtlwifi/pci.c