xen/arm: Check return code from fdt_finish_reservemap()

fdt_finish_reservemap() may fail (with -FDT_ERR_NOSPACE) in which case
further DTB creation (in prepare_dtb_hwdom()) makes no sense. Fix it.

Fixes: 13bb63b754 ("device tree,arm: supply a flat device tree to dom0")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
This commit is contained in:
Michal Orzel committed 2025-03-04 08:54:53 +01:00
1 parent c29e5a16cb
commit dd0f6ea412
1 file changed
+3 -1
+3 -1
View File
@@ -2038,7 +2038,9 @@ static int __init prepare_dtb_hwdom(struct domain *d, struct kernel_info *kinfo)
if ( ret < 0 )
goto err;
fdt_finish_reservemap(kinfo->fdt);
ret = fdt_finish_reservemap(kinfo->fdt);
if ( ret )
goto err;
ret = handle_node(d, kinfo, dt_host, default_p2mt);
if ( ret )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.