
Rather than looking for a zero-sized image, use the error code returned to determine if things are OK.
Signed-off-by: Simon Glass sjg@chromium.org ---
boot/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/boot/bootm.c b/boot/bootm.c index 57eaa1ff10df..5e3b5e940734 100644 --- a/boot/bootm.c +++ b/boot/bootm.c @@ -324,8 +324,8 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc, /* get kernel image header, start address and length */ ret = boot_get_kernel("bootm", argv[0], &images, &images.os.image_start, &images.os.image_len, &os_hdr); - if (images.os.image_len == 0) { - puts("ERROR: can't get kernel image!\n"); + if (ret) { + printf("ERROR %dE: can't get kernel image!\n", ret); return 1; }