diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index bd3d3195097faf2726614a6c32adc567b57455d3..2d0dd69f9753ced49e03a40628e4c88550a64208 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1264,7 +1264,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
 	return 0;
 
 error:
+	mutex_lock(&local->mtx);
 	ieee80211_vif_release_channel(sdata);
+	mutex_unlock(&local->mtx);
+
 	return err;
 }