]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
cmd: source: Clean up a few lines
authorSean Anderson <sean.anderson@seco.com>
Mon, 12 Dec 2022 19:12:10 +0000 (14:12 -0500)
committerTom Rini <trini@konsulko.com>
Sat, 31 Dec 2022 18:35:19 +0000 (13:35 -0500)
This simplifies a few lines and corrects an error message.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/source.c

index 698d9f86d9652f264c5e749ec616f25d9b90309d..597382460188367f1e455ff3e15924548f025436 100644 (file)
@@ -128,16 +128,14 @@ int image_source_script(ulong addr, const char *fit_uname)
                }
 
                if (!fit_image_check_type (fit_hdr, noffset, IH_TYPE_SCRIPT)) {
-                       puts ("Not a image image\n");
+                       puts("Not a script image\n");
                        return 1;
                }
 
                /* verify integrity */
-               if (verify) {
-                       if (!fit_image_verify(fit_hdr, noffset)) {
-                               puts ("Bad Data Hash\n");
-                               return 1;
-                       }
+               if (verify && !fit_image_verify(fit_hdr, noffset)) {
+                       puts("Bad Data Hash\n");
+                       return 1;
                }
 
                /* get script subimage data address and length */