Skip to content
Commit e8fc2eff authored by Daniel Schultz's avatar Daniel Schultz Committed by Tom Rini
Browse files

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: default avatarDaniel Schultz <d.schultz@phytec.de>
Reviewed-by: default avatarTeresa Remmet <t.remmet@phytec.de>
parent 1e5de690
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment