From: Heiko Stuebner Date: Fri, 29 Nov 2019 15:40:42 +0000 (+0100) Subject: rockchip: misc: don't fail if eth_addr already set X-Git-Tag: v2025.01-rc5-pxa1908~2653^2~10 X-Git-Url: http://git.dujemihanovic.xyz/html/index.html?a=commitdiff_plain;h=d490fadc703c54f61e6ba8f47dfd7a4702ac2293;p=u-boot.git rockchip: misc: don't fail if eth_addr already set rockchip_setup_macaddr() runs from an initcall, so returning an error code will make that initcall fail thus breaking the boot process. And if an ethernet address is already set this is definitly not a cause for that, so just return success in that case. Fixes: 04825384999f ("rockchip: rk3399: derive ethaddr from cpuid"); Signed-off-by: Heiko Stuebner Reviewed-by: Kever Yang --- diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c index f697e937c6..546377e61d 100644 --- a/arch/arm/mach-rockchip/misc.c +++ b/arch/arm/mach-rockchip/misc.c @@ -30,7 +30,7 @@ int rockchip_setup_macaddr(void) /* Only generate a MAC address, if none is set in the environment */ if (env_get("ethaddr")) - return -1; + return 0; if (!cpuid) { debug("%s: could not retrieve 'cpuid#'\n", __func__);