Skip to content

Commit

Permalink
iwlwifi: unregister LEDs if mac80211 registration fails
Browse files Browse the repository at this point in the history
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 <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jun 5, 2012
1 parent f69a23b commit 0e1fa7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/iwlwifi/iwl-mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0e1fa7e

Please sign in to comment.