ath10k: release conf_mutex if vdev_start() fails
authorKalle Valo <kvalo@qca.qualcomm.com>
Thu, 13 Feb 2014 16:13:12 +0000 (18:13 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 14 Feb 2014 11:20:45 +0000 (13:20 +0200)
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@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 5c5860ef36bd3c89084102e0676c75752e934837..44b550b2fcfdc3039721e03e55fdefa5a14793bc 100644 (file)
@@ -2785,7 +2785,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;
@@ -2866,6 +2866,7 @@ static void ath10k_bss_info_changed(struct ieee80211_hw *hw,
                        ath10k_bss_assoc(hw, vif, info);
        }
 
+exit:
        mutex_unlock(&ar->conf_mutex);
 }