From 9773100d627699e7f738f1399192fb14b58d06be Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 5 Nov 2025 12:18:23 -0500 Subject: [PATCH] tlv_eeprom: do not start over with default contents if invalid Signed-off-by: Hugo Villeneuve --- src/tlv_eeprom.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/tlv_eeprom.c b/src/tlv_eeprom.c index 967e6dd..0b1dbc2 100644 --- a/src/tlv_eeprom.c +++ b/src/tlv_eeprom.c @@ -119,15 +119,6 @@ int read_eeprom(int devnum, u8 *eeprom) else if (ret == -ENODEV) return ret; - // If the contents are invalid, start over with default contents - if (!is_valid_tlvinfo_header(eeprom_hdr) || - !is_checksum_valid(eeprom)) { - strcpy(eeprom_hdr->signature, TLV_INFO_ID_STRING); - eeprom_hdr->version = TLV_INFO_VERSION; - eeprom_hdr->totallen = cpu_to_be16(0); - update_crc(eeprom); - } - return ret; } -- 2.20.1