diff --git a/common/fdt_support.c b/common/fdt_support.c
index 5a83bca48177d738f6d493283214ac6ca099167e..a79bc085b205a042ec146e255481d1e7cb934fc2 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -610,7 +610,7 @@ int fdt_resize(void *blob)
 		fdt_size_dt_strings(blob) + sizeof(struct fdt_reserve_entry);
 
 	/* Make it so the fdt ends on a page boundary */
-	actualsize = ALIGN(actualsize, 0x1000);
+	actualsize = ALIGN(actualsize + ((uint)blob & 0xfff), 0x1000);
 	actualsize = actualsize - ((uint)blob & 0xfff);
 
 	/* Change the fdt header to reflect the correct size */