From: Michal Kazior Date: Wed, 19 Aug 2015 11:08:53 +0000 (+0200) Subject: ath10k: add missing mutex unlock on failpath X-Git-Tag: v5.15~14822^2~157^2~1^2~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=503422d95248c1d9698735bb5803b70aa51b18ef;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 9bca378..64674c9 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) {