From: Emmanuel Grumbach Date: Mon, 24 Jun 2013 12:44:03 +0000 (+0300) Subject: iwlwifi: mvm: unregister leds when registration failed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8351cafff00be058ce4db3753010632e29d104f3;p=karo-tx-linux.git iwlwifi: mvm: unregister leds when registration failed commit b7327d89ae694a89f9934d428bde520b77b3131c upstream. This was missing and prevented any further attempts to load the module. Signed-off-by: Emmanuel Grumbach Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index b7e95b0a42b7..f7545e06ce2a 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -243,7 +243,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,