wifi: rtw89: coex: initialize local .dbcc_2g_phy in _set_btg_ctrl()

For the case of DBCC enabled and fwrole version 0, the local variable
wl_rinfo.dbcc_2g_phy might not be set by following for-loop, leading
uninitialized variable before using.

Addresses-Coverity-ID: 1586724 ("Uninitialized scalar variable")

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20240919081216.28505-3-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih
2024-09-19 16:12:15 +08:00
parent 630d5d8f2b
commit 6cdfb56596

View File

@@ -4855,6 +4855,8 @@ static void _set_btg_ctrl(struct rtw89_dev *rtwdev)
if (rtwdev->dbcc_en) {
if (ver->fwlrole == 0) {
wl_rinfo.dbcc_2g_phy = RTW89_PHY_MAX;
for (i = 0; i < RTW89_PHY_MAX; i++) {
if (wl_dinfo->real_band[i] == RTW89_BAND_2G)
wl_rinfo.dbcc_2g_phy = i;