iwlwifi: mvm: remove useless condition in LED code
authorJohannes Berg <johannes.berg@intel.com>
Thu, 29 Jun 2017 07:14:45 +0000 (09:14 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Aug 2017 06:15:32 +0000 (09:15 +0300)
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>
drivers/net/wireless/intel/iwlwifi/mvm/led.c

index 3cac4278a5fde9ecd36744c36a2489f3be74c237..95ef37df292fcbfc185fa34c0882fff6855fde0a 100644 (file)
@@ -129,8 +129,7 @@ int iwl_mvm_leds_init(struct iwl_mvm *mvm)
 
 void iwl_mvm_leds_exit(struct iwl_mvm *mvm)
 {
-       if (iwlwifi_mod_params.led_mode == IWL_LED_DISABLE ||
-           !(mvm->init_status & IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE))
+       if (!(mvm->init_status & IWL_MVM_INIT_STATUS_LEDS_INIT_COMPLETE))
                return;
 
        led_classdev_unregister(&mvm->led);