iwlwifi: unregister LEDs if mac80211 registration fails
authorJohannes Berg <johannes.berg@intel.com>
Tue, 5 Jun 2012 07:38:35 +0000 (09:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jun 2012 18:21:25 +0000 (11:21 -0700)
commit 0e1fa7ef25004b9c1a14147bce61c15c2f1c6744 upstream.

Otherwise the LEDs stick around and cause issues the
next time around since they're still there but not
really hooked up.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/iwl-mac80211.c

index dcb13c8967701fcc950fa59f7867f52ddbc9aaac..1018f9b8b41c728e7af7aba188ab965990110b8c 100644 (file)
@@ -245,6 +245,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;