]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iwlwifi: mvm: fix failure path when power_update fails in add_interface
authorLuciano Coelho <luciano.coelho@intel.com>
Tue, 27 Jan 2015 13:06:57 +0000 (15:06 +0200)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 2 Mar 2015 13:17:01 +0000 (13:17 +0000)
commit fd66fc1cafd72ddf27dbec3a5e29e99839d1bc84 upstream.

When iwl_mvm_power_update_mac() is called, we have already added the
mac context, so if this call fails we should remove the mac.

Fixes: commit e5e7aa8e2561 ('iwlwifi: mvm: refactor power code')
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index 1a53515530782d66c6d194c2df5c5e93ebc3e872..b690f7a4ae2f7b12f9d77597aadbca943ca64cc0 100644 (file)
@@ -832,7 +832,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
 
        ret = iwl_mvm_power_update_mac(mvm);
        if (ret)
-               goto out_release;
+               goto out_remove_mac;
 
        /* beacon filtering */
        ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0);