diff mbox series

[2/3] cmd: source: Clean up a few lines

Message ID 20221013182731.407192-3-sean.anderson@seco.com
State Superseded
Delegated to: Tom Rini
Headers show
Series cmd: source: Support specifying config name | expand

Commit Message

Sean Anderson Oct. 13, 2022, 6:27 p.m. UTC
This simplifies a few lines and corrects an error message.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

 cmd/source.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Comments

Simon Glass Oct. 14, 2022, 3:56 p.m. UTC | #1
On Thu, 13 Oct 2022 at 12:28, Sean Anderson <sean.anderson@seco.com> wrote:
>
> This simplifies a few lines and corrects an error message.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
>  cmd/source.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/cmd/source.c b/cmd/source.c
index bb98255fe86..f08e6d34172 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 */