diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-11-05 10:07:58 +0100 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2019-01-29 15:10:30 +0100 |
commit | 94a8d87c47642bc0b99f1c9204b111b5826f1838 (patch) | |
tree | 4571156a5de04460c5da66ee228b8898cd058f98 | |
parent | iwlwifi: move iwl_enable_{rx,tx}_ampdu to iwl-modparams.h (diff) | |
download | linux-94a8d87c47642bc0b99f1c9204b111b5826f1838.tar.xz linux-94a8d87c47642bc0b99f1c9204b111b5826f1838.zip |
iwlwifi: mvm: pre-initialize alive_data in wait_alive()
The function we pass to the wait alive notification procedure may may
not even get called if the timeout occurs before the function is
called. To prevent accessing unitialized data in alive_data, pre-set
it to zero in the declaration. Found by static analyzers.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 27582d70d45a..d3dc9d276e0f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -293,7 +293,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm, enum iwl_ucode_type ucode_type) { struct iwl_notification_wait alive_wait; - struct iwl_mvm_alive_data alive_data; + struct iwl_mvm_alive_data alive_data = {}; const struct fw_img *fw; int ret; enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img; |