From: Johannes Berg Date: Tue, 5 Jun 2012 07:38:35 +0000 (+0200) Subject: iwlwifi: unregister LEDs if mac80211 registration fails X-Git-Tag: v3.5-rc3~22^2~10^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e1fa7ef25004b9c1a14147bce61c15c2f1c6744;p=platform%2Fkernel%2Flinux-exynos.git iwlwifi: unregister LEDs if mac80211 registration fails Otherwise the LEDs stick around and cause issues the next time around since they're still there but not really hooked up. Cc: stable@kernel.org Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 5d158ca..3ee23134 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c @@ -251,6 +251,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, ret = ieee80211_register_hw(priv->hw); if (ret) { IWL_ERR(priv, "Failed to register hw (error %d)\n", ret); + iwl_leds_exit(priv); return ret; } priv->mac80211_registered = 1;