Commit 1ea2301fcfbfc85e38eb51e1144c5ac190c4c320

Authored by Andreas Bießmann
Committed by Tom Rini
1 parent 24542528fe

board:tricorder: always work with valid eeprom data

Commit 890880583d84607e36b52a785a96b167728bbf73 introduced EEPROM parsing and
board detection but faild to return a valid tricorder_eeprom struct for backup
case.  When pressing S200 while reading EEPROM we ignore the value. We
returned falsely a tricorder_eeprom struct with uninitialized data which is
just garbage.
Initialize it by zeroing the whole structure.

Signed-off-by: Andreas Bießmann <andreas.biessmann@corscience.de>
Cc: Thomas Weber <thomas.weber@corscience.de>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

board/corscience/tricorder/tricorder.c
... ... @@ -79,6 +79,8 @@
79 79 } else {
80 80 panic("Could not get board revision\n");
81 81 }
  82 + } else {
  83 + memset(eeprom, 0, TRICORDER_EEPROM_SIZE);
82 84 }
83 85 }
84 86