From: Eliad Peller Date: Sun, 15 Nov 2015 13:44:17 +0000 (+0200) Subject: iwlwifi: mvm: check iwl_mvm_wowlan_config_key_params() return value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3f50a69077b5b8086fd16cfa0b71138082126a69;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwlwifi: mvm: check iwl_mvm_wowlan_config_key_params() return value commit 9a4c830007817e ("iwlwifi: mvm: refactor d3 key update functions") refactored some code into iwl_mvm_wowlan_config_key_params() function, but the return value was never checked, and not all the function flows returned valid values. fix it. Fixes: ac8ef0ce38de ("iwlwifi: mvm: refactor d3 key update functions") Signed-off-by: Eliad Peller Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 9e51843764ca..542de7401a8d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -917,6 +917,7 @@ int iwl_mvm_wowlan_config_key_params(struct iwl_mvm *mvm, if (ret) goto out; } + ret = 0; out: kfree(key_data.rsc_tsc); return ret; @@ -946,8 +947,11 @@ iwl_mvm_wowlan_config(struct iwl_mvm *mvm, * that isn't really a problem though. */ mutex_unlock(&mvm->mutex); - iwl_mvm_wowlan_config_key_params(mvm, vif, true, CMD_ASYNC); + ret = iwl_mvm_wowlan_config_key_params(mvm, vif, true, + CMD_ASYNC); mutex_lock(&mvm->mutex); + if (ret) + return ret; } ret = iwl_mvm_send_cmd_pdu(mvm, WOWLAN_CONFIGURATION, 0,