Message ID | 20240110041431.2806052-1-lilinmao@kylinos.cn (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [v2] wifi: rtw89: 8852b: avoid reporting errors by cppcheck | expand |
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c index 259df67836a0..03169287667c 100644 --- a/drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c +++ b/drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c @@ -1388,17 +1388,15 @@ static void _iqk_get_ch_info(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy, u u32 reg_rf18; u32 reg_35c; u8 idx; - u8 get_empty_table = false; for (idx = 0; idx < RTW89_IQK_CHS_NR; idx++) { if (iqk_info->iqk_mcc_ch[idx][path] == 0) { - get_empty_table = true; break; } } rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK] (1)idx = %x\n", idx); - if (!get_empty_table) { + if (idx >= RTW89_IQK_CHS_NR) { idx = iqk_info->iqk_table_idx[path] + 1; if (idx > 1) idx = 0;