[PATCH 3/3] ath10k: release conf_mutex if vdev_start() fails

Kalle Valo kvalo at qca.qualcomm.com
Thu Feb 13 04:57:05 EST 2014


I modified Michal's commit c930f744bdb0 ("ath10k: implement channel switching") to return
when vdev_start() fails, but forgot to release conf_mutex.

Found by coccinelle:

>> drivers/net/wireless/ath/ath10k/mac.c:2745:5-11: preceding lock on line 2663

Signed-off-by: Kalle Valo <kvalo at qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index a57dc20..5d3c758 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2770,7 +2770,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
 				if (ret) {
 					ath10k_warn("failed to start vdev: %d\n",
 						    ret);
-					return;
+					goto exit;
 				}
 
 				arvif->is_started = true;
@@ -2851,6 +2851,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
 			ath10k_bss_assoc(hw, vif, info);
 	}
 
+exit:
 	mutex_unlock(&ar->conf_mutex);
 }
 




More information about the ath10k mailing list