]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2015 22:43:23 +0000 (14:43 -0800)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index d06414ef15c5fda60ae91fb0442abe50dd207e0e..e7e2a1bdd9ed741785356116fa152187f41dcea1 100644 (file)
@@ -597,7 +597,7 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
 
        ret = iwl_mvm_mac_ctxt_add(mvm, vif);
        if (ret)
-               goto out_release;
+               goto out_remove_mac;
 
        iwl_mvm_power_disable(mvm, vif);