From: Luciano Coelho Date: Tue, 27 Jan 2015 13:06:57 +0000 (+0200) Subject: iwlwifi: mvm: fix failure path when power_update fails in add_interface X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fd66fc1cafd72ddf27dbec3a5e29e99839d1bc84;p=linux-beck.git iwlwifi: mvm: fix failure path when power_update fails in add_interface 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. CC: [3.15+] Fixes: commit e5e7aa8e2561 ('iwlwifi: mvm: refactor power code') Signed-off-by: Luciano Coelho Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 51e02e6ba0ac..1ff7ec08532d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -1355,7 +1355,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);