OSDN Git Service

rtw88: don't treat NULL pointer as an array
authorBrian Norris <briannorris@chromium.org>
Fri, 21 Aug 2020 21:17:16 +0000 (14:17 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 27 Aug 2020 10:04:16 +0000 (13:04 +0300)
commit22b726cbdd09d9891ede8aa122a950d2d0ae5e09
tree75223590b2daf8ddd6cdd937ac705b617867ee93
parent5466aff85aacf1aad6d0e056c136ea7798076b2b
rtw88: don't treat NULL pointer as an array

I'm not a standards expert, but this really looks to be undefined
behavior, when chip->dig_cck may be NULL. (And, we're trying to do a
NULL check a few lines down, because some chip variants will use NULL.)

Fixes: fc637a860a82 ("rtw88: 8723d: Set IG register for CCK rate")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Acked-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200821211716.1631556-1-briannorris@chromium.org
drivers/net/wireless/realtek/rtw88/phy.c