From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] rockchip: misc: Don't fail if ethaddr is already set
Date: Tue, 3 Dec 2019 16:46:32 +0100 [thread overview]
Message-ID: <20191203154632.340463-2-paul.kocialkowski@bootlin.com> (raw)
In-Reply-To: <20191203154632.340463-1-paul.kocialkowski@bootlin.com>
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 <paul.kocialkowski@bootlin.com>
---
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
next prev parent reply other threads:[~2019-12-03 15:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 15:46 [PATCH 1/2] rockchip: misc: Only assign serial# variable if unset Paul Kocialkowski
2019-12-03 15:46 ` Paul Kocialkowski [this message]
2019-12-03 19:47 ` [PATCH 2/2] rockchip: misc: Don't fail if ethaddr is already set Heiko Stuebner
2019-12-03 19:50 ` [PATCH 1/2] rockchip: misc: Only assign serial# variable if unset Heiko Stuebner
2019-12-04 11:09 ` Paul Kocialkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191203154632.340463-2-paul.kocialkowski@bootlin.com \
--to=paul.kocialkowski@bootlin.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox