Commit 269663f1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c76fa846
...@@ -1225,12 +1225,12 @@ static ...@@ -1225,12 +1225,12 @@ static
struct htt_ppdu_stats_info *ath11k_dp_htt_get_ppdu_desc(struct ath11k *ar, struct htt_ppdu_stats_info *ath11k_dp_htt_get_ppdu_desc(struct ath11k *ar,
u32 ppdu_id) u32 ppdu_id)
{ {
struct htt_ppdu_stats_info *ppdu_info = NULL; struct htt_ppdu_stats_info *ppdu_info;
spin_lock_bh(&ar->data_lock); spin_lock_bh(&ar->data_lock);
if (!list_empty(&ar->ppdu_stats_info)) { if (!list_empty(&ar->ppdu_stats_info)) {
list_for_each_entry(ppdu_info, &ar->ppdu_stats_info, list) { 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); spin_unlock_bh(&ar->data_lock);
return ppdu_info; return ppdu_info;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment