mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
5baa5b9cbd
commit
b27eedee70
1 file changed
-6
@@ -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 )
|
||||
{
|
||||
|
||||