On 03.12.19 16:46, Paul Kocialkowski wrote:
rockchip_setup_macaddr will return -1 if ethaddr is already set, which
gets propagated to misc_init_r and eventually halts the boot process.

While checking that the variable is not already set before attempting to
setit  is legitimate (it's a set-once variable), this is no good reason
to halt the boot process.

Return the success return code if the variable is already set instead.

Signed-off-by: Paul Kocialkowski <[email protected]>

Same as "rockchip: misc: don't fail if eth_addr already set" from november 29 ;-)


---
  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 a0c6a1c0b266..bce10bb04f8f 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__);


Reply via email to