Searched hist:"86331 c7e0cd819bf0c1d0dcf895e0c90b0aa9a6f" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/drivers/net/wireless/realtek/rtw88/ |
H A D | phy.c | diff 86331c7e0cd819bf0c1d0dcf895e0c90b0aa9a6f Wed Jul 27 01:50:03 CDT 2022 Zong-Zhe Yang <kevin_yang@realtek.com> wifi: rtw88: phy: fix warning of possible buffer overflow
reported by smatch
phy.c:854 rtw_phy_linear_2_db() error: buffer overflow 'db_invert_table[i]' 8 <= 8 (assuming for loop doesn't break)
However, it seems to be a false alarm because we prevent it originally via if (linear >= db_invert_table[11][7]) return 96; /* maximum 96 dB */
Still, we adjust the code to be more readable and avoid smatch warning.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220727065003.28340-5-pkshih@realtek.com
|