summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/board_f.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c
index dcad551ae4..b61036577a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -670,7 +670,7 @@ static int reloc_fdt(void)
if (gd->flags & GD_FLG_SKIP_RELOC)
return 0;
if (gd->new_fdt) {
- memcpy(gd->new_fdt, gd->fdt_blob, gd->fdt_size);
+ memcpy(gd->new_fdt, gd->fdt_blob, fdt_totalsize(gd->fdt_blob));
gd->fdt_blob = gd->new_fdt;
}
#endif