spl: Correct checking of configuration node

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

Signed-off-by: Bin Meng <bmeng@tinylab.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Bin Meng 2023-05-01 11:35:26 +08:00 committed by Tom Rini
parent 33c63cea5e
commit 1310ad3aac

View file

@ -331,7 +331,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;