The initrd is NULL if provided via a FIT, this leads to unwanted prints
like:

| Loaded initrd from Flattened Image Tree <NULL> to 
0x0000000043e70000-0x000000004409a38a

Fix this by checking the initrd and pass an empty sting if not set.
While on it fix the superfluous newline.

Fixes: b62b21eddf30 ("bootm: refactor for readability and extensibility")
Signed-off-by: Marco Felsch <[email protected]>
---
 common/bootm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/common/bootm.c b/common/bootm.c
index 11c560fa2788..631850988489 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -318,14 +318,13 @@ bootm_load_initrd(struct image_data *data, unsigned long 
load_address)
        } else if (data->os_fit) {
                res = bootm_load_fit_initrd(data, load_address);
                type = filetype_fit;
-
        }
 
        if (IS_ERR_OR_NULL(res))
                return res;
 
        pr_info("Loaded initrd from %s %s%s%s to %pa-%pa\n",
-               file_type_to_string(type), initrd,
+               file_type_to_string(type), initrd ?: "",
                initrd_part ? "@" : "", initrd_part ?: "",
                &res->start, &res->end);
 
-- 
2.47.3


Reply via email to