[PATCH 1/3] common: Drop check for DM in initf_dm()

Simon Glass sjg at chromium.org
Mon Oct 21 17:51:29 CEST 2024


This is enabled by all boards, so drop the condition.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/board_f.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index f1bd70fdd6c..8684ed71284 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -811,9 +811,11 @@ static int initf_bootstage(void)
 
 static int initf_dm(void)
 {
-#if defined(CONFIG_DM) && CONFIG_IS_ENABLED(SYS_MALLOC_F)
 	int ret;
 
+	if (!CONFIG_IS_ENABLED(SYS_MALLOC_F))
+		return 0;
+
 	bootstage_start(BOOTSTAGE_ID_ACCUM_DM_F, "dm_f");
 	ret = dm_init_and_scan(true);
 	bootstage_accum(BOOTSTAGE_ID_ACCUM_DM_F);
@@ -825,7 +827,6 @@ static int initf_dm(void)
 		if (ret)
 			return ret;
 	}
-#endif
 
 	return 0;
 }
-- 
2.43.0



More information about the U-Boot mailing list