Commit b491a37d4370f77ebd49178aa505caaa621c4cd1

Authored by Peng Fan
Committed by guoyin.chen
1 parent 54ae0b21fc

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 <Peng.Fan@freescale.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Max Krummenacher <max.krummenacher@toradex.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Cc: Paul Kocialkowski <contact@paulk.fr>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit 2ea47be02f356ff275fa5c50392ea510ddb4a96c)

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -325,7 +325,7 @@
325 325  
326 326 if (load == image_start ||
327 327 load == image_data) {
328   - fdt_blob = (char *)image_data;
  328 + fdt_addr = load;
329 329 break;
330 330 }
331 331