dom0less: Remove redundant magic check in 'check_partial_fdt()'

The function 'check_partial_fdt()' performs an explicit check for the FDT
magic number (FDT_MAGIC) before calling 'fdt_check_header(). This check is
redundant, because 'fdt_check_header()' includes checking the magic number.

Remove the redundant check to simplify the code and rely on the library
function to perform header validation.

Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@epam.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
Dmytro Prokopchuk1 authored and Julien Grall committed 2025-11-16 12:26:37 +00:00
1 parent 5baa5b9cbd
commit b27eedee70
1 file changed
-6
-6
View File
@@ -359,12 +359,6 @@ static int __init check_partial_fdt(void *pfdt, size_t size)
{
int res;
if ( fdt_magic(pfdt) != FDT_MAGIC )
{
dprintk(XENLOG_ERR, "Partial FDT is not a valid Flat Device Tree");
return -EINVAL;
}
res = fdt_check_header(pfdt);
if ( res )
{
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.