]> git.dujemihanovic.xyz Git - u-boot.git/commit
board: phytec: phytec_som_detection: fix eeprom_data zero check
authorYannic Moog <y.moog@phytec.de>
Wed, 20 Dec 2023 08:45:34 +0000 (09:45 +0100)
committerFabio Estevam <festevam@denx.de>
Wed, 20 Dec 2023 18:04:46 +0000 (15:04 -0300)
commit71714cda3d077b9199e3bfda8cbf0a081b0a5fa9
tree3f224524d8d218ebeebd74b6a87c3dcef7fdd84e
parentda37f78525dc8a87a71f9e8d61eb891ba028eaec
board: phytec: phytec_som_detection: fix eeprom_data zero check

In phytec_eeprom_data_init, after reading eeprom data into buffer, it is
checked whether all bytes are 0x0 by iterating over chunks of the
buffer. The offset, or index of the chunk, was never changed, leading to
repeated comparison of only the first chunk. Use array notation and
access chunk via array index to compare all chunks of the buffer.

Signed-off-by: Yannic Moog <y.moog@phytec.de>
board/phytec/common/phytec_som_detection.c