Currently, we silently ignore the return value of netops->read_rom_hwaddr(). This naturally is bad and we should check if the code ran successfully.
Signed-off-by: Olliver Schinagl <oli...@schinagl.nl> --- net/eth-uclass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/eth-uclass.c b/net/eth-uclass.c index c88b032868..024136a7cb 100644 --- a/net/eth-uclass.c +++ b/net/eth-uclass.c @@ -511,8 +511,8 @@ static int eth_post_probe(struct udevice *dev) pdata->enetaddr_src = ENETADDR_SRC_EEPROM; else /* Check if the device driver has a MAC address */ - if (eth_get_ops(dev)->read_rom_hwaddr) { - eth_get_ops(dev)->read_rom_hwaddr(dev); + if (eth_get_ops(dev)->read_rom_hwaddr && + !eth_get_ops(dev)->read_rom_hwaddr(dev)) { pdata->enetaddr_src = ENETADDR_SRC_DRIVER; } -- 2.11.0 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot