board: phytec: common: Fix eepom is empty check
The ptr variable is currently defined as int and sizeof returns the size of the eeprom data struct as Byte (32 in total). In case the eeprom is empty, the check, if the eeprom is empty, will most likely stop after 8 iterations because it will continue with the stack which should contain some data. Therefore, the init function will detect an empty EEPROM as API0 and return with the valid flag set to True. Fixes: dc22188c ("board: phytec: Add common PHYTEC SoM detection") Signed-off-by:Daniel Schultz <d.schultz@phytec.de> Reviewed-by:
Teresa Remmet <t.remmet@phytec.de>
Loading
Please register or sign in to comment