9
0
Fork 0

bootm: Fix check for ret-value

The intention of this code was to check the return value of fdt_open_into. Fix
this.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Steffen Trumtrar 2012-04-18 11:09:19 +02:00 committed by Sascha Hauer
parent 8cde76869a
commit 89c2c5cff8
1 changed files with 3 additions and 4 deletions

View File

@ -202,10 +202,9 @@ static int bootm_open_oftree(struct image_data *data, char *oftree, int num)
}
fdt = xrealloc(fdt, size + 0x8000);
fdt_open_into(fdt, fdt, size + 0x8000);
if (!fdt) {
printf("unable to read %s\n", oftree);
ret = fdt_open_into(fdt, fdt, size + 0x8000);
if (ret) {
printf("unable to parse %s\n", oftree);
return -ENODEV;
}