]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: Correct checking of configuration node
authorBin Meng <bmeng@tinylab.org>
Mon, 1 May 2023 03:35:26 +0000 (11:35 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 31 May 2023 21:23:01 +0000 (17:23 -0400)
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>
common/spl/spl.c

index 72078a8ebc8ec8669ceffa8254e9527553250b54..801c4b507cad9c2082451c92852699f0376b0971 100644 (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;