[ipxe-devel] [PATCH] [ath5k] Add missing AR5K_EEPROM_READ in ath5k_eeprom_read_turbo_modes

Bruce Rogers brogers at suse.com
Tue Feb 16 18:29:41 UTC 2021


The GCC11 compiler pointed out something that apparently no previous
compiler noticed: in ath5k_eeprom_pread_turbo_modes, local variable
val is used uninitialized. From what I can see, the code is just
missing an initial AR5K_EEPROM_READ. Add it right before the switch
statement.

Signed-off-by: Bruce Rogers <brogers at suse.com>
---
 src/drivers/net/ath/ath5k/ath5k_eeprom.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/drivers/net/ath/ath5k/ath5k_eeprom.c b/src/drivers/net/ath/ath5k/ath5k_eeprom.c
index 983d206b..12519bc5 100644
--- a/src/drivers/net/ath/ath5k/ath5k_eeprom.c
+++ b/src/drivers/net/ath/ath5k/ath5k_eeprom.c
@@ -416,6 +416,7 @@ ath5k_eeprom_read_turbo_modes(struct ath5k_hw *ah,
 	if (ee->ee_version < AR5K_EEPROM_VERSION_5_0)
 		return 0;
 
+	AR5K_EEPROM_READ(o++, val);
 	switch (mode){
 	case AR5K_EEPROM_MODE_11A:
 		ee->ee_switch_settling_turbo[mode] = (val >> 6) & 0x7f;
-- 
2.30.0




More information about the ipxe-devel mailing list