From: Peng Fan Date: Tue, 24 Nov 2015 08:54:22 +0000 (+0800) Subject: common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY X-Git-Tag: v2025.01-rc5-pxa1908~10941 X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20.RelPermalink%20%7D%7D?a=commitdiff_plain;h=2ea47be02f356ff275fa5c50392ea510ddb4a96c;p=u-boot.git common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;", or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);" at the end of the switch case. Signed-off-by: Peng Fan Cc: Simon Glass Cc: Joe Hershberger Cc: Max Krummenacher Cc: Marek Vasut Cc: Suriyan Ramasami Cc: Paul Kocialkowski Cc: Tom Rini Reviewed-by: Simon Glass --- diff --git a/common/image-fdt.c b/common/image-fdt.c index 5180a03a61..5e4e5bd914 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -326,7 +326,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, if (load == image_start || load == image_data) { - fdt_blob = (char *)image_data; + fdt_addr = load; break; }