From patchwork Fri Nov 29 15:40:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 1202517 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sntech.de Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 47PdzC3sxwz9sPj for ; Sat, 30 Nov 2019 02:41:43 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 4298AC22091; Fri, 29 Nov 2019 15:41:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id CF360C21C2F; Fri, 29 Nov 2019 15:41:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id ECA6AC21C38; Fri, 29 Nov 2019 15:41:08 +0000 (UTC) Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by lists.denx.de (Postfix) with ESMTPS id 810FEC21C2C for ; Fri, 29 Nov 2019 15:41:05 +0000 (UTC) Received: from p5b127909.dip0.t-ipconnect.de ([91.18.121.9] helo=phil.sntech) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1iaiOD-0000Gw-2R; Fri, 29 Nov 2019 16:41:01 +0100 From: Heiko Stuebner To: u-boot@lists.denx.de Date: Fri, 29 Nov 2019 16:40:42 +0100 Message-Id: <20191129154043.17395-1-heiko@sntech.de> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Cc: Heiko Stuebner , christoph.muellner@theobroma-systems.com Subject: [U-Boot] [PATCH 1/2] rockchip: misc: don't fail if eth_addr already set X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Heiko Stuebner 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 --- 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__);