diff options
| author | Miri Korenblit <[email protected]> | 2025-02-09 12:34:46 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2025-02-11 11:41:45 +0000 |
| commit | 3f8aa0b8a53df2247a84eaf3b3aa38b6ef86cb1c (patch) | |
| tree | 08c3f1734408a8f12b657bcbbd7f0bfd0bc994a8 | |
| parent | wifi: iwlwifi: fw: allocate chained SG tables for dump (diff) | |
| download | kernel-3f8aa0b8a53df2247a84eaf3b3aa38b6ef86cb1c.tar.gz kernel-3f8aa0b8a53df2247a84eaf3b3aa38b6ef86cb1c.zip | |
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: 43e0b2ada519 ("wifi: iwlwifi: fw: add an error table status getter")
Signed-off-by: Miri Korenblit <[email protected]>
Reviewed-by: Emmanuel Grumbach <[email protected]>
Link: https://patch.msgid.link/20250209143303.37cdbba4eb56.I95fe9bd95303b8179f946766558a9f15f4fe254c@changeid
Signed-off-by: Johannes Berg <[email protected]>
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/fw/dump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dump.c b/drivers/net/wireless/intel/iwlwifi/fw/dump.c index 8e0c85a1240d..c7b261c8ec96 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dump.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dump.c @@ -540,6 +540,9 @@ bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id) } err_info = {}; int ret; + if (err_id) + *err_id = 0; + if (!base) return false; |
