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:
parent
8cde76869a
commit
89c2c5cff8
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue