[PATCH v4 4/5] cmd: source: Clean up a few lines
Sean Anderson
sean.anderson at seco.com
Mon Dec 12 20:12:10 CET 2022
This simplifies a few lines and corrects an error message.
Signed-off-by: Sean Anderson <sean.anderson at seco.com>
Reviewed-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
cmd/source.c | 10 ++++------
1 file 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 */
--
2.35.1.1320.gc452695387.dirty
More information about the U-Boot
mailing list