[PATCH] boot/fit: remove useless else branch

Julien Stephan jstephan at baylibre.com
Tue Mar 24 16:33:45 CET 2026


The assignment of load = data is already performed before the
if–elseif logic, making the additional assignment in the else
branch unnecessary.

Remove the redundant statement to simplify
the control flow and improve readability.

Signed-off-by: Julien Stephan <jstephan at baylibre.com>
---
While doing some debug on overlay loading, I notice this useless else
branch in fit_image_load(). Let's just remove it.
---
 boot/image-fit.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/boot/image-fit.c b/boot/image-fit.c
index e7c7212195f..a0864bd0906 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2281,8 +2281,6 @@ int fit_image_load(struct bootm_headers *images, ulong addr,
 
 		printf("   Loading %s from 0x%08lx to 0x%08lx\n",
 		       prop_name, data, load);
-	} else {
-		load = data;	/* No load address specified */
 	}
 
 	comp = IH_COMP_NONE;

---
base-commit: 1ffc541eafc96d5eebcf837ab892dccec3b93568
change-id: 20260324-boot-fit-fix-8-byte-alignement-for-overlays-381b0a17bf4e

Best regards,
-- 
Julien Stephan <jstephan at baylibre.com>



More information about the U-Boot mailing list