DF-2256 / fix.diff
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c @@ -3700,7 +3700,10 @@ int it; for (it = 0; it < many; it++) { - (void)ar9300_calibration_data_read(ah, address - it, buffer + it, 1); + if (!ar9300_calibration_data_read(ah, address - it, + buffer + it, 1)) { + return AH_FALSE; + } } return AH_TRUE; } @@ -3900,8 +3903,10 @@ restored = 0; for (it = 0; it < MSTATE; it++) { - (void) ar9300_calibration_data_read_array( - ah, cptr, word, compression_header_length); + if (! ar9300_calibration_data_read_array( + ah, cptr, word, compression_header_length)) { + break; + } if (word[0] == blank && word[1] == blank && word[2] == blank && word[3] == blank) { break; @@ -3920,9 +3925,12 @@ } #endif osize = length; - (void) ar9300_calibration_data_read_array( - ah, cptr, word, - compression_header_length + osize + compression_checksum_length); + if (! ar9300_calibration_data_read_array( + ah, cptr, word, + compression_header_length + osize + + compression_checksum_length)) { + break; + } checksum = ar9300_compression_checksum( &word[compression_header_length], length); mchecksum = |