summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_bootm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index a783cea5d3..306c8f395a 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -650,12 +650,11 @@ static int do_bootm_states(cmd_tbl_t *cmdtp, int flag, int argc,
iflag = bootm_disable_interrupts();
ret = bootm_load_os(images, &load_end, 0);
- if (ret && ret != BOOTM_ERR_OVERLAP)
- goto err;
-
if (ret == 0)
lmb_reserve(&images->lmb, images->os.load,
(load_end - images->os.load));
+ else if (ret && ret != BOOTM_ERR_OVERLAP)
+ goto err;
else if (ret == BOOTM_ERR_OVERLAP)
ret = 0;
}