iwlwifi: mvm: unregister leds when registration failed
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 24 Jun 2013 12:44:03 +0000 (15:44 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Jul 2013 10:11:18 +0000 (13:11 +0300)
This was missing and prevented any further attempts
to load the module.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
drivers/net/wireless/iwlwifi/mvm/mac80211.c

index e08683b2053183f7e7ea9df370a37bdb4b70c2e4..cab2f0c61ec7e91014d82a2c5b17cb6e0f89492e 100644 (file)
@@ -257,7 +257,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
        if (ret)
                return ret;
 
-       return ieee80211_register_hw(mvm->hw);
+       ret = ieee80211_register_hw(mvm->hw);
+       if (ret)
+               iwl_mvm_leds_exit(mvm);
+
+       return ret;
 }
 
 static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,