Skip to content

Commit

Permalink
ath10k: fix potential issue of peer stats allocation
Browse files Browse the repository at this point in the history
STA number was not restored if OOM happened.

Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00018
Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  • Loading branch information
Zhi Chen authored and Kalle Valo committed Nov 8, 2019
1 parent 05a1100 commit 402838a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -6604,6 +6604,7 @@ static int ath10k_sta_state(struct ieee80211_hw *hw,
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats),
GFP_KERNEL);
if (!arsta->tx_stats) {
ath10k_mac_dec_num_stations(arvif, sta);
ret = -ENOMEM;
goto exit;
}
Expand Down

0 comments on commit 402838a

Please sign in to comment.