diff options
author | Raja Mani <rmani@qti.qualcomm.com> | 2015-07-09 10:49:43 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2015-08-19 12:09:18 +0200 |
commit | 5db879aefa0ef6dea4fdda268dd94016bc165f3d (patch) | |
tree | ef510a533dc14e2a9136b922660e98b8b33459d8 | |
parent | ath10k: ensure pktlog disable cmd reaches fw before pdev suspend (diff) | |
download | linux-5db879aefa0ef6dea4fdda268dd94016bc165f3d.tar.xz linux-5db879aefa0ef6dea4fdda268dd94016bc165f3d.zip |
ath10k: free collected fw stats memory if .pull_fw_stats fails
If .pull_fw_stats() fails for some reason while processing
fw stats event, collected pdev/vdev/peer stats just before
the failure should be freed. This is unlikely to happen,
just code review catch.
Signed-off-by: Raja Mani <rmani@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r-- | drivers/net/wireless/ath/ath10k/debug.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c index f7aa1c73b481..bf033f46f8aa 100644 --- a/drivers/net/wireless/ath/ath10k/debug.c +++ b/drivers/net/wireless/ath/ath10k/debug.c @@ -323,7 +323,7 @@ void ath10k_debug_fw_stats_process(struct ath10k *ar, struct sk_buff *skb) ret = ath10k_wmi_pull_fw_stats(ar, skb, &stats); if (ret) { ath10k_warn(ar, "failed to pull fw stats: %d\n", ret); - goto unlock; + goto free; } /* Stat data may exceed htc-wmi buffer limit. In such case firmware @@ -386,7 +386,6 @@ free: ath10k_debug_fw_stats_vdevs_free(&stats.vdevs); ath10k_debug_fw_stats_peers_free(&stats.peers); -unlock: spin_unlock_bh(&ar->data_lock); } |