diff options
author | Stephen Boyd <sboyd@kernel.org> | 2024-02-16 17:05:52 -0800 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2024-03-08 12:50:39 -0600 |
commit | 221a819aa3ca5bbbc91ce425b3e8d9463b121d09 (patch) | |
tree | 2de33a7dd7e48738c32fde6ab3c3feb44d11743e /arch/um | |
parent | 7b937cc243e5b1df8780a0aa743ce800df6c68d1 (diff) |
um: Unconditionally call unflatten_device_tree()
Call this function unconditionally so that we can populate an empty DTB
on platforms that don't boot with a command line provided DTB. There's
no harm in calling unflatten_device_tree() unconditionally. If there
isn't a valid initial_boot_params dtb then unflatten_device_tree()
returns early.
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-um@lists.infradead.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240217010557.2381548-4-sboyd@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/dtb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c index 484141b06938..4954188a6a09 100644 --- a/arch/um/kernel/dtb.c +++ b/arch/um/kernel/dtb.c @@ -16,16 +16,16 @@ void uml_dtb_init(void) void *area; area = uml_load_file(dtb, &size); - if (!area) - return; - - if (!early_init_dt_scan(area)) { - pr_err("invalid DTB %s\n", dtb); - memblock_free(area, size); - return; + if (area) { + if (!early_init_dt_scan(area)) { + pr_err("invalid DTB %s\n", dtb); + memblock_free(area, size); + return; + } + + early_init_fdt_scan_reserved_mem(); } - early_init_fdt_scan_reserved_mem(); unflatten_device_tree(); } |