diff options
| author | 2022-07-27 14:50:03 +0800 | |
|---|---|---|
| committer | 2022-08-09 08:48:08 +0300 | |
| commit | 86331c7e0cd819bf0c1d0dcf895e0c90b0aa9a6f (patch) | |
| tree | 7e04fe1c9c499a1f7b8170c99080636bf734221d /include/linux/debugobjects.h | |
| parent | wifi: rtw88: fix store OP channel info timing when HW scan (diff) | |
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
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
