]> git.dujemihanovic.xyz Git - u-boot.git/commit
board: phytec: check eeprom_data validity
authorYannic Moog <y.moog@phytec.de>
Fri, 19 Apr 2024 15:55:38 +0000 (08:55 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 29 Apr 2024 16:55:57 +0000 (10:55 -0600)
commit1e5de690f305ea719ecd906b757b378b412128a3
tree79e8fdcc217168cdae981c6e719182a0784f3e36
parent8fe6e9a00fea7faa129a741feb50d5a165c422c1
board: phytec: check eeprom_data validity

For all of the functions that access the eeprom_data, make sure these
data are valid. Use the valid member of the phytec_eeprom_data struct.
This fixes a bug where only the API revision check guarded against
accessing rubbish. But if API revision was e.g. 6, eeprom setup failed
before, but phytec_get_imx8m_eth would still happily access the data.

Fixes: dc22188cdc8 ("board: phytec: Add common PHYTEC SoM detection")
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Teresa Remmet <t.remmet@phytec.de>
board/phytec/common/imx8m_som_detection.c
board/phytec/common/phytec_som_detection.c