From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Kocialkowski Date: Tue, 3 Dec 2019 16:46:32 +0100 Subject: [PATCH 2/2] rockchip: misc: Don't fail if ethaddr is already set In-Reply-To: <20191203154632.340463-1-paul.kocialkowski@bootlin.com> References: <20191203154632.340463-1-paul.kocialkowski@bootlin.com> Message-ID: <20191203154632.340463-2-paul.kocialkowski@bootlin.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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__); -- 2.24.0