Skip to content

Commit 2730be8

Browse files
committed
wifi: rtw89: coex: initialize local .dbcc_2g_phy in _set_btg_ctrl()
JIRA: https://issues.redhat.com/browse/RHEL-73817 commit 6cdfb56 Author: Ping-Ke Shih <pkshih@realtek.com> Date: Thu Sep 19 16:12:15 2024 +0800 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 Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent b3c86d1 commit 2730be8

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/realtek/rtw89

1 file changed

+2
-0
lines changed

drivers/net/wireless/realtek/rtw89/coex.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4859,6 +4859,8 @@ static void _set_btg_ctrl(struct rtw89_dev *rtwdev)
48594859

48604860
if (rtwdev->dbcc_en) {
48614861
if (ver->fwlrole == 0) {
4862+
wl_rinfo.dbcc_2g_phy = RTW89_PHY_MAX;
4863+
48624864
for (i = 0; i < RTW89_PHY_MAX; i++) {
48634865
if (wl_dinfo->real_band[i] == RTW89_BAND_2G)
48644866
wl_rinfo.dbcc_2g_phy = i;

0 commit comments

Comments
 (0)