mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
iwlwifi: mvm: remove useless condition in LED code
If the module parameter is set to disable the LED, we leave the initialization routine before setting the LEDS_INIT_COMPLETE status bit. Therefore, there's no need to check the parameter again on exit, just the status check is sufficient. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
2db3aaba0a
commit
4aa234eeec
1 changed files with 1 additions and 2 deletions
|
@ -129,8 +129,7 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
|
||||||
|
|
||||||
void iwl_mvm_leds_exit(struct iwl_mvm *mvm)
|
void iwl_mvm_leds_exit(struct iwl_mvm *mvm)
|
||||||
{
|
{
|
||||||
if (iwlwifi_mod_params.led_mode == IWL_LED_DISABLE ||
|
if (!(mvm->init_status & IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE))
|
||||||
!(mvm->init_status & IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
led_classdev_unregister(&mvm->led);
|
led_classdev_unregister(&mvm->led);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue