Skip to content
Commit 59ca26c9 authored by Aaradhana Sahu's avatar Aaradhana Sahu Committed by Kalle Valo
Browse files

wifi: ath12k: fix NULL pointer access in ath12k_mac_op_get_survey()



Smatch throws below error

drivers/net/wireless/ath/ath12k/mac.c:8318 ath12k_mac_op_get_survey() error: we previously assumed 'sband' could be null

Currently, we access sband inside the null check of the sband
in ath12k_mac_op_get_survey().

Fix this issue by removing the entire if block, because decrement
idx is unnecessary since there are no more band to test.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1

Fixes: 70e3be54 ("wifi: ath12k: fix survey dump collection in 6 GHz")
Signed-off-by: default avatarAaradhana Sahu <quic_aarasahu@quicinc.com>
Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20240611031017.297927-2-quic_aarasahu@quicinc.com
parent aadeee47
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment