]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
x86: boot: fix unreachable else branch in boot_prep_linux
authorGuillaume Ranquet <ranquet.guillaume@gmail.com>
Thu, 11 Sep 2025 13:35:41 +0000 (15:35 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 3 Feb 2026 18:51:40 +0000 (12:51 -0600)
The else if branch uses the is_zimage boolean which is initialized to 0
and never set before being tested here.

remove the test on is_zimage to make this code reachable.

Signed-off-by: Guillaume Ranquet <ranquet.guillaume@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/x86/lib/bootm.c

index 0827a884b1d245ecb8a55d46105a1d67d0cdfb56..7a94dc877e31dc8c02131699b9318c35e4fcfe79 100644 (file)
@@ -103,7 +103,7 @@ static int boot_prep_linux(struct bootm_headers *images)
                }
                is_zimage = 1;
 #if defined(CONFIG_FIT)
-       } else if (images->fit_uname_os && is_zimage) {
+       } else if (images->fit_uname_os) {
                ret = fit_image_get_data(images->fit_hdr_os,
                                         images->fit_noffset_os,
                                         (const void **)&data, &len);