summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/bootm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 6ed60bf0508..a23c791a9e1 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -324,9 +324,9 @@ 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(cmdtp->name, 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");
+ &os_hdr);
+ if (ret) {
+ printf("ERROR %dE: can't get kernel image!\n", ret);
return 1;
}