diff options
author | Steffen Trumtrar <s.trumtrar@pengutronix.de> | 2012-04-18 11:09:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-04-18 20:38:24 +0200 |
commit | 89c2c5cff827b7ad65af9560e907395a7829fa68 (patch) | |
tree | 2ef0f194b502797a066b032b2990d6272b1573c9 /commands | |
parent | 8cde76869abc66b57bc42f086ade89598dfb0271 (diff) | |
download | barebox-89c2c5cff827b7ad65af9560e907395a7829fa68.tar.gz barebox-89c2c5cff827b7ad65af9560e907395a7829fa68.tar.xz |
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>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/bootm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/commands/bootm.c b/commands/bootm.c index 1e1dc52ebf..4f4cbb3ea9 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -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; } |