提交 4aa234ee 编写于 作者: J Johannes Berg 提交者: Luca Coelho

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: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 2db3aaba
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册