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-Tag: v3.16.35~2761 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=42b2ca931874e366aa74f0b597d19cd52fa96ca3;p=thirdparty%2Fkernel%2Fstable.git iwlwifi: mvm: fix failure path when power_update fails in add_interface 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 Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach Signed-off-by: Luis Henriques --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 1a53515530782..b690f7a4ae2f7 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -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);