wifi: ath12k: drop NULL pointer check in ath12k_update_per_peer_tx_stats()
authorMa Ke <make_ruc2021@163.com>
Wed, 25 Oct 2023 17:47:56 +0000 (20:47 +0300)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 31 Oct 2023 07:45:12 +0000 (09:45 +0200)
Since 'user_stats' is a fixed-size array of 'struct htt_ppdu_user_stats'
in 'struct htt_ppdu_stats', any of its member can't be NULL and so
relevant check may be dropped.

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20231013074711.2202850-1-make_ruc2021@163.com
drivers/net/wireless/ath/ath12k/dp_rx.c

index 3543fadac4a576b562dbae1bf0031f5f084dcc1d..9f831e3971f932118bd77ce6a6a8178d8c0ef6ae 100644 (file)
@@ -1339,9 +1339,6 @@ ath12k_update_per_peer_tx_stats(struct ath12k *ar,
        u8 tid = HTT_PPDU_STATS_NON_QOS_TID;
        bool is_ampdu = false;
 
-       if (!usr_stats)
-               return;
-
        if (!(usr_stats->tlv_flags & BIT(HTT_PPDU_STATS_TAG_USR_RATE)))
                return;