mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
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>
This commit is contained in:
parent
e78da25e19
commit
94a8d87c47
@ -293,7 +293,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
|
|||||||
enum iwl_ucode_type ucode_type)
|
enum iwl_ucode_type ucode_type)
|
||||||
{
|
{
|
||||||
struct iwl_notification_wait alive_wait;
|
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;
|
const struct fw_img *fw;
|
||||||
int ret;
|
int ret;
|
||||||
enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img;
|
enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img;
|
||||||
|
Loading…
Reference in New Issue
Block a user