summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath11k/dp_rx.c
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2023-08-24 09:50:44 +0200
committerKalle Valo <quic_kvalo@quicinc.com>2023-09-21 10:14:50 +0200
commit82ae3f4635382ff23e2ece55b5d5e713223951ec (patch)
tree76b8d47ac0dbbbd9804ce6f28840666d7ea180a5 /drivers/net/wireless/ath/ath11k/dp_rx.c
parentwifi: ath11k: drop NULL pointer check in ath11k_update_per_peer_tx_stats() (diff)
downloadlinux-82ae3f4635382ff23e2ece55b5d5e713223951ec.tar.xz
linux-82ae3f4635382ff23e2ece55b5d5e713223951ec.zip
wifi: ath11k: drop redundant check in ath11k_dp_rx_mon_dest_process()
In 'ath11k_dp_rx_mon_dest_process()', 'mon_dst_srng' points to a member of 'srng_list', which is a fixed-size array inside 'struct ath11k_hal'. This way, if 'ring_id' is valid (i. e. between 0 and HAL_SRNG_RING_ID_MAX - 1 inclusive), 'mon_dst_srng' can't be NULL and so relevant check may be dropped. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230824075121.121144-1-dmantipov@yandex.ru
Diffstat (limited to 'drivers/net/wireless/ath/ath11k/dp_rx.c')
-rw-r--r--drivers/net/wireless/ath/ath11k/dp_rx.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index 146201d8dba2..4463e308968c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -5094,13 +5094,6 @@ static void ath11k_dp_rx_mon_dest_process(struct ath11k *ar, int mac_id,
mon_dst_srng = &ar->ab->hal.srng_list[ring_id];
- if (!mon_dst_srng) {
- ath11k_warn(ar->ab,
- "HAL Monitor Destination Ring Init Failed -- %p",
- mon_dst_srng);
- return;
- }
-
spin_lock_bh(&pmon->mon_lock);
ath11k_hal_srng_access_begin(ar->ab, mon_dst_srng);