diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index a783cea5d39a4dc1fb318db8b8d253e3c60cad1c..306c8f395ad897fb1a06b387fe95b6d0dd204873 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; }