Message ID | 20191129154043.17395-1-heiko@sntech.de |
---|---|
State | Accepted |
Delegated to: | Kever Yang |
Headers | show |
Series | [U-Boot,1/2] rockchip: misc: don't fail if eth_addr already set | expand |
On 2019/11/29 下午11:40, Heiko Stuebner wrote: > From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com> > > 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 <heiko.stuebner@theobroma-systems.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Thanks, - Kever > --- > arch/arm/mach-rockchip/misc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c > index bed4317f7e..d0fb3d07a7 100644 > --- a/arch/arm/mach-rockchip/misc.c > +++ b/arch/arm/mach-rockchip/misc.c > @@ -29,7 +29,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__);
diff --git a/arch/arm/mach-rockchip/misc.c b/arch/arm/mach-rockchip/misc.c index bed4317f7e..d0fb3d07a7 100644 --- a/arch/arm/mach-rockchip/misc.c +++ b/arch/arm/mach-rockchip/misc.c @@ -29,7 +29,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__);