[PATCH] cmd/fdt: fix conf node lookup failure check

fit_conf_get_node() returns negative value on error.
Signed-off-by: Baruch Siach baruch@tkos.co.il --- cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/fdt.c b/cmd/fdt.c index aae3278526c4..2401ea8b44cb 100644 --- a/cmd/fdt.c +++ b/cmd/fdt.c @@ -733,7 +733,7 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
gd->fdt_blob = blob; cfg_noffset = fit_conf_get_node(working_fdt, NULL); - if (!cfg_noffset) { + if (cfg_noffset < 0) { printf("Could not find configuration node: %s\n", fdt_strerror(cfg_noffset)); return CMD_RET_FAILURE;

Hi,
On Mon, May 1, 2023 at 4:19 PM Baruch Siach baruch@tkos.co.il wrote:
fit_conf_get_node() returns negative value on error.
Signed-off-by: Baruch Siach baruch@tkos.co.il
cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
There is already a patch on the ML before:
https://patchwork.ozlabs.org/project/uboot/patch/20230501033526.1150030-1-bm...
Regards, Bin
participants (2)
-
Baruch Siach
-
Bin Meng