diff mbox series

[v2,2/5] board: gateworks: venice: do not overwrite serial#

Message ID 20210818222431.13862-2-tharvey@gateworks.com
State Accepted
Commit 45e82c379ce873c9ff2cde97b47f576971c19f96
Delegated to: Stefano Babic
Headers show
Series [v2,1/5] board: gateworks: venice: display hwmon details by default | expand

Commit Message

Tim Harvey Aug. 18, 2021, 10:24 p.m. UTC
Do not overwrite existing serial# env to avoid:
 ## Error: Can't overwrite "serial#"
 ## Error inserting "serial#" variable, errno=1

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
v2: added missing error to commit log
---
 board/gateworks/venice/imx8mm_venice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Stefano Babic Oct. 7, 2021, 2:12 p.m. UTC | #1
> Do not overwrite existing serial# env to avoid:
>  ## Error: Can't overwrite "serial#"
>  ## Error inserting "serial#" variable, errno=1
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index 2a97d55d32..46f4bff925 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -114,7 +114,8 @@  int board_late_init(void)
 	led_default_state();
 
 	/* Set board serial/model */
-	env_set_ulong("serial#", gsc_get_serial());
+	if (!env_get("serial#"))
+		env_set_ulong("serial#", gsc_get_serial());
 	env_set("model", gsc_get_model());
 
 	/* Set fdt_file vars */