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>
}
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 */