summaryrefslogtreecommitdiff
path: root/common/fdt_support.c
diff options
context:
space:
mode:
authorGerald Van Baren <vanbaren@cideas.com>2007-04-19 23:14:39 -0400
committerGerald Van Baren <vanbaren@cideas.com>2007-04-19 23:14:39 -0400
commit7651f8bdbba03bb0b4f241e2d2c4cb65b230bd56 (patch)
tree32e427d198d369aec66173f3a015cd71a6ab1b5b /common/fdt_support.c
parent37837828d89084879bee2f2b8c7c68d4695940df (diff)
downloadu-boot-imx-7651f8bdbba03bb0b4f241e2d2c4cb65b230bd56.zip
u-boot-imx-7651f8bdbba03bb0b4f241e2d2c4cb65b230bd56.tar.gz
u-boot-imx-7651f8bdbba03bb0b4f241e2d2c4cb65b230bd56.tar.bz2
Fix serious pointer bug with bootm and reserve map.
What was suppose to be a stack variable was declared as a pointer, overwriting random memory. Also moved the libfdt.a requirement into the main Makefile. That is The U-Boot Way.
Diffstat (limited to 'common/fdt_support.c')
-rw-r--r--common/fdt_support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 91b729f..69099c4 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -56,7 +56,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
}
if (initrd_start && initrd_end) {
- struct fdt_reserve_entry *re;
+ struct fdt_reserve_entry re;
int used;
int total;
int j;
@@ -77,7 +77,7 @@ int fdt_chosen(void *fdt, ulong initrd_start, ulong initrd_end, int force)
*/
for (j = 0; j < used; j++) {
err = fdt_get_reservemap(fdt, j, &re);
- if (re->address == initrd_start) {
+ if (re.address == initrd_start) {
break;
}
}