From: Hugo Villeneuve Date: Wed, 5 Nov 2025 17:18:23 +0000 (-0500) Subject: tlv_eeprom: do not start over with default contents if invalid X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=9773100d627699e7f738f1399192fb14b58d06be;p=mtlv.git tlv_eeprom: do not start over with default contents if invalid Signed-off-by: Hugo Villeneuve --- 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; }