]> git.baikalelectronics.ru Git - kernel.git/commit
rtw89: fix maybe uninitialized `qempty` variable
authorÍñigo Huguet <ihuguet@redhat.com>
Thu, 13 Jan 2022 09:42:53 +0000 (10:42 +0100)
committerKalle Valo <kvalo@kernel.org>
Fri, 28 Jan 2022 15:57:46 +0000 (17:57 +0200)
commitbc7e5e3c0d2be229ee03c125cb95fd3baceb4522
tree1192b37c59f83233af25e01cd1897187c47252d7
parent9b4bc345a7b2d426b2996060518a529fae6d547f
rtw89: fix maybe uninitialized `qempty` variable

Call to dle_dfi_qempty might fail, leaving qempty.qempty untouched, which
is latter used to control the for loop. If that happens, it's not
initialized anywhere.

Initialize it so the loop doesn't iterate unless it's modified by the
call to dle_dfi_qempty.

Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220113094253.73370-1-ihuguet@redhat.com
drivers/net/wireless/realtek/rtw89/mac.c