diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-14 12:20:05 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-01-26 22:45:40 +0100 |
commit | aded35ece45620df5a3d729f5218270348d2e1c6 (patch) | |
tree | 13faa859bb03182456d35ef3379158a74774598e /arch/arm/lib | |
parent | 3f0835e0741c80305faf638aaf174ac9d235e83e (diff) | |
download | barebox-aded35ece45620df5a3d729f5218270348d2e1c6.tar.gz barebox-aded35ece45620df5a3d729f5218270348d2e1c6.tar.xz |
bootm: move initrd code together
The initrd code is distributed in several places in the bootm code.
Move it all together in bootm_load_initrd().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/bootm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index eef906a36b..4dfe148915 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -86,9 +86,11 @@ static int __do_bootm_linux(struct image_data *data, unsigned long free_mem, int } } - ret = bootm_load_initrd(data, initrd_start); - if (ret) - return ret; + if (bootm_has_initrd(data)) { + ret = bootm_load_initrd(data, initrd_start); + if (ret) + return ret; + } if (data->initrd_res) { initrd_start = data->initrd_res->start; |