[PATCH 07/13] boot: Check the image is allowed before setting os.arch
Simon Glass
sjg at chromium.org
Wed Mar 25 17:54:16 CET 2026
There is no point in setting the architecture if the image cannot be
used. Move the check a little higher within fit_image_load().
Signed-off-by: Simon Glass <sjg at chromium.org>
---
boot/image-fit.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/boot/image-fit.c b/boot/image-fit.c
index 5e90cd2cf50..ba8a56a8ff4 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2388,13 +2388,13 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
}
}
- fit_image_get_arch(fit, noffset, &os_arch);
- images_set_arch(images, os_arch);
-
ret = check_allowed(fit, noffset, image_type, arch, bootstage_id);
if (ret)
return ret;
+ fit_image_get_arch(fit, noffset, &os_arch);
+ images_set_arch(images, os_arch);
+
ret = obtain_data(fit, noffset, prop_name, bootstage_id, &buf, &len);
if (ret)
return ret;
--
2.43.0
More information about the U-Boot
mailing list