From: Sean Anderson Date: Mon, 12 Dec 2022 19:12:10 +0000 (-0500) Subject: cmd: source: Clean up a few lines X-Git-Tag: v2023.07~207^2~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4f5738e690487dc59c8234782e792e57dac9a22;p=platform%2Fkernel%2Fu-boot.git cmd: source: Clean up a few lines This simplifies a few lines and corrects an error message. Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- diff --git a/cmd/source.c b/cmd/source.c index 698d9f8..5973824 100644 --- a/cmd/source.c +++ b/cmd/source.c @@ -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 */