Repeating dry runs with an initrd will eventually lead to exhausting the reserve memory entries as OF_MAX_RESERVE_MAP is only 16.
Make sure to clean up after ourselves if bootm_boot returns without actually booting. Signed-off-by: Ahmad Fatoum <[email protected]> --- common/bootm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/bootm.c b/common/bootm.c index e3bd2eecb0cc..c554fa9e4015 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -1247,6 +1247,8 @@ int bootm_boot(struct bootm_data *bootm_data) err_out: bootm_reset_overrides(); release_sdram_region(data->os_res); + if (data->initrd_res) + of_del_reserve_entry(data->initrd_res->start, data->initrd_res->end); release_sdram_region(data->initrd_res); release_sdram_region(data->oftree_res); release_sdram_region(data->tee_res); -- 2.47.3
