From: Bin Meng Date: Mon, 1 May 2023 03:35:25 +0000 (+0800) Subject: cmd: fdt: Correct checking of configuration node X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=33c63cea5ee13da6cc7c62443b1f953f74828302;p=u-boot.git cmd: fdt: Correct checking of configuration node fit_conf_get_node() returns a negative value on error. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- diff --git a/cmd/fdt.c b/cmd/fdt.c index aae3278526..2401ea8b44 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;