diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-12-13 11:52:19 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-12-18 18:56:26 +0100 |
commit | 269663f18474b739fcf45389c8fea82de3332e2f (patch) | |
tree | cca7e11cb290dd7bfe8a3380c785a5b29c4e8f85 /drivers/net/wireless | |
parent | ath11k: checking for NULL vs IS_ERR() (diff) | |
download | linux-269663f18474b739fcf45389c8fea82de3332e2f.tar.xz linux-269663f18474b739fcf45389c8fea82de3332e2f.zip |
ath11k: remove an unneeded NULL check
The list iterator is always non-NULL so it doesn't need to be checked.
I also removed the unnecessary initializer because the list iterator is
always initialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath11k/dp_rx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 1b3b65c0038c..3a3dc7680622 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1225,12 +1225,12 @@ static struct htt_ppdu_stats_info *ath11k_dp_htt_get_ppdu_desc(struct ath11k *ar, u32 ppdu_id) { - struct htt_ppdu_stats_info *ppdu_info = NULL; + struct htt_ppdu_stats_info *ppdu_info; spin_lock_bh(&ar->data_lock); if (!list_empty(&ar->ppdu_stats_info)) { list_for_each_entry(ppdu_info, &ar->ppdu_stats_info, list) { - if (ppdu_info && ppdu_info->ppdu_id == ppdu_id) { + if (ppdu_info->ppdu_id == ppdu_id) { spin_unlock_bh(&ar->data_lock); return ppdu_info; } |