aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/libboard/qmod/source/board_qmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/libboard/qmod/source/board_qmod.c')
-rw-r--r--firmware/libboard/qmod/source/board_qmod.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/firmware/libboard/qmod/source/board_qmod.c b/firmware/libboard/qmod/source/board_qmod.c
index acd090f..bdc08f9 100644
--- a/firmware/libboard/qmod/source/board_qmod.c
+++ b/firmware/libboard/qmod/source/board_qmod.c
@@ -113,9 +113,11 @@ static int erase_hub_eeprom(void)
/* write the EEPROM once */
for (i = 0; i < 256; i++) {
int rc = eeprom_write_byte(0x50, i, 0xff);
- /* if the result was negative, repeat that write */
- if (rc < 0)
- i--;
+ if (rc < 0) {
+ TRACE_ERROR("Erasing EEPROM failed at byte %u: 0x%02x\n\r",
+ i, __eeprom_bin[i]);
+ return 1;
+ }
}
return 0;