[PATCH 2/2] spl: Correct checking of configuration node

Bin Meng bmeng at tinylab.org
Mon May 1 05:35:26 CEST 2023


Per the fit_conf_get_node() API doc, it returns configuration node
offset when found (>=0).

Signed-off-by: Bin Meng <bmeng at tinylab.org>
---

 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index a630e79866..7c0aff93e7 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -329,7 +329,7 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
 
 	conf_noffset = fit_conf_get_node((const void *)header,
 					 fit_uname_config);
-	if (conf_noffset <= 0)
+	if (conf_noffset < 0)
 		return 0;
 
 	for (idx = 0;
-- 
2.34.1



More information about the U-Boot mailing list