]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
Prevent crash if random DTB address is passed to bootm
authorAnatolij Gustschin <agust@denx.de>
Fri, 29 Aug 2008 19:04:45 +0000 (21:04 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 6 Sep 2008 22:17:32 +0000 (00:17 +0200)
This patch adds bootm_start() return value check. If
error status is returned, we do not proceed further to
prevent board reset or crash as we still can recover
at this point.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
common/cmd_bootm.c
common/image.c

index 0db7b75bac5bdab908f1264261079d92db1529ad..374085ca38f24d7016c81ebadbae9c21be01f934 100644 (file)
@@ -361,7 +361,8 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong           load_end = 0;
        int             ret;
 
-       bootm_start(cmdtp, flag, argc, argv);
+       if (bootm_start(cmdtp, flag, argc, argv))
+               return 1;
 
        /*
         * We have reached the point of no return: we are going to
index 55c4ccec8bc0fa4b7422d72e50148b00322d901c..0acdcf132a6dcd4702e93a7cd5e918363877239b 100644 (file)
@@ -1516,7 +1516,7 @@ int boot_get_fdt (int flag, int argc, char *argv[], bootm_headers_t *images,
                        }
                        break;
                default:
-                       fdt_error ("Did not find a cmdline Flattened Device Tree");
+                       puts ("ERROR: Did not find a cmdline Flattened Device Tree\n");
                        goto error;
                }