Skip to content

Commit 3f8aa0b

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
wifi: iwlwifi: fw: avoid using an uninitialized variable
iwl_fwrt_read_err_table can return true also when it failed to read the memory. In this case, err_id argument is not initialized, but the callers are still using it. Simply initialize it to 0. If the error table was read successfully it'll be overridden. Fixes: 43e0b2a ("wifi: iwlwifi: fw: add an error table status getter") Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Link: https://patch.msgid.link/20250209143303.37cdbba4eb56.I95fe9bd95303b8179f946766558a9f15f4fe254c@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 7774e39 commit 3f8aa0b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • drivers/net/wireless/intel/iwlwifi/fw

drivers/net/wireless/intel/iwlwifi/fw/dump.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,9 @@ bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id)
540540
} err_info = {};
541541
int ret;
542542

543+
if (err_id)
544+
*err_id = 0;
545+
543546
if (!base)
544547
return false;
545548

0 commit comments

Comments
 (0)