From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from paleale.coelho.fi ([176.9.41.70]:42458 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751401AbdHETnh (ORCPT ); Sat, 5 Aug 2017 15:43:37 -0400 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Johannes Berg , Luca Coelho Date: Sat, 5 Aug 2017 22:43:13 +0300 Message-Id: <20170805194331.17426-2-luca@coelho.fi> (sfid-20170805_214342_864227_2E55E136) In-Reply-To: <20170805194331.17426-1-luca@coelho.fi> References: <20170805194331.17426-1-luca@coelho.fi> Subject: [PATCH 01/19] iwlwifi: mvm: remove useless condition in LED code Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Johannes Berg 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 Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/led.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/led.c b/drivers/net/wireless/intel/iwlwifi/mvm/led.c index 3cac4278a5fd..95ef37df292f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/led.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/led.c @@ -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); -- 2.13.2