[PATCH] ARM: i.MX: Fix overwriting defaultenv with zii board specific env

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



zii_imx7d_dev_init() lacks a protection against running on the wrong
hardware. Add it so that the defaultenv no longer gets overwritten with
a board specific variant.

Fixes: 31300d79e8 ("ARM: zii-common: Add common environment directory")
Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/boards/zii-imx7d-dev/board.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/boards/zii-imx7d-dev/board.c b/arch/arm/boards/zii-imx7d-dev/board.c
index 6b409e23b7..5f7314b0b8 100644
--- a/arch/arm/boards/zii-imx7d-dev/board.c
+++ b/arch/arm/boards/zii-imx7d-dev/board.c
@@ -54,6 +54,8 @@ static int zii_imx7d_dev_init(void)
 		barebox_set_hostname("rpu2");
 	else if (of_machine_is_compatible("zii,imx7d-rmu2"))
 		barebox_set_hostname("rmu2");
+	else
+		return 0;
 
 	defaultenv_append_directory(defaultenv_zii_common);
 
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux