aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/mac.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2015-08-19 13:08:53 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2015-08-26 11:04:26 +0300
commit503422d95248c1d9698735bb5803b70aa51b18ef (patch)
tree218ab8e03119fbdff42ae47394905e0b4ba47c12 /drivers/net/wireless/ath/ath10k/mac.c
parentath10k: free collected fw stats memory if .pull_fw_stats fails (diff)
downloadlinux-dev-503422d95248c1d9698735bb5803b70aa51b18ef.tar.xz
linux-dev-503422d95248c1d9698735bb5803b70aa51b18ef.zip
ath10k: add missing mutex unlock on failpath
Kernel would complain about leaving a held lock after going back to userspace and would subsequently deadlock. Fixes: e04cafbc38c7 ("ath10k: fix peer limit enforcement") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 9bca37820848..64674c955d44 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -4144,7 +4144,8 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
if (ar->num_peers >= ar->max_num_peers) {
ath10k_warn(ar, "refusing vdev creation due to insufficient peer entry resources in firmware\n");
- return -ENOBUFS;
+ ret = -ENOBUFS;
+ goto err;
}
if (ar->free_vdev_map == 0) {