cmd: fdt: Correct checking of configuration node
PATCH 1/2 cmd: fdt: Correct checking of configuration node
fit_conf_get_node() returns a negative value on error.
---
cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/fdt.c +1 -1
@@ -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 ;
Signature · 1 line
2.34.1
PATCH 2/2 spl: Correct checking of configuration node
Per the fit_conf_get_node() API doc, it returns configuration node offset when found (>=0).
---
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl.c +1 -1
@@ -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;
Signature · 1 line
2.34.1
Re: [PATCH 2/2] spl: Correct checking of configuration node
Quoted 9 lines · Bin Meng
Per the
fit_conf_get_node()API doc, it returns configuration node offset when found (>=0).Signed-off-by Bin Meng <[email protected]>---
common/spl/spl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines
common/spl/spl.c +1
-2@@ -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; --
Quoted 2 lines
2.34.1
(note that it can never be 0 in fact, since 0 is the root node)
Re: [PATCH 2/2] spl: Correct checking of configuration node
In reply to Bin MengQuoted 5 lines · Bin Meng
Per the
fit_conf_get_node()API doc, it returns configuration node offset when found (>=0).Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom
Quoted 8 lines · Bin Meng
fit_conf_get_node()returns a negative value on error.Signed-off-by Bin Meng <[email protected]>---
cmd/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines · Bin Meng
fit_conf_get_node()returns a negative value on error.Signed-off-by Bin Meng <[email protected]>Reviewed-by Simon Glass <[email protected]>
Applied to u-boot/next, thanks!
Signature · 1 line
Tom