summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2022-12-12 22:12:10 +0300
committerTom Rini <trini@konsulko.com>2022-12-31 21:35:19 +0300
commitc4f5738e690487dc59c8234782e792e57dac9a22 (patch)
tree8f133e7b07ba68e18f7c1d4fa68e1cce210f814d /cmd
parent30fb045f2dccf1a58153bae2183121a1ae8fe05b (diff)
downloadu-boot-c4f5738e690487dc59c8234782e792e57dac9a22.tar.xz
cmd: source: Clean up a few lines
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/source.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/source.c b/cmd/source.c
index 698d9f86d9..5973824601 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 */