diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-08 16:02:55 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-08 16:02:55 -0400 |
commit | 94e922c76a0e1fcdead3359e340f53fd0709a963 (patch) | |
tree | 667372191c3a70cd9343180c8d7f6273afbb9ab9 /common/image-fit-sig.c | |
parent | 0caf37e973015255a3c5b9439ddb8c6aef1b5001 (diff) | |
parent | 4cb35b7a1fdf060a0839b71f6dbf8d08b1ae62e0 (diff) |
Merge branch '2021-10-08-image-cleanups'
- A large number of image file and tooling related cleanups
Diffstat (limited to 'common/image-fit-sig.c')
-rw-r--r-- | common/image-fit-sig.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/image-fit-sig.c b/common/image-fit-sig.c index b979cd2a4b..4edebbf2d3 100644 --- a/common/image-fit-sig.c +++ b/common/image-fit-sig.c @@ -49,10 +49,8 @@ struct image_region *fit_region_make_list(const void *fit, * Use malloc() except in SPL (to save code size). In SPL the caller * must allocate the array. */ -#ifndef CONFIG_SPL_BUILD - if (!region) + if (!IS_ENABLED(CONFIG_SPL_BUILD) && !region) region = calloc(sizeof(*region), count); -#endif if (!region) return NULL; for (i = 0; i < count; i++) { @@ -72,11 +70,10 @@ static int fit_image_setup_verify(struct image_sign_info *info, char *algo_name; const char *padding_name; - if (fdt_totalsize(fit) > CONFIG_FIT_SIGNATURE_MAX_SIZE) { + if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) { *err_msgp = "Total size too large"; return 1; } - if (fit_image_hash_get_algo(fit, noffset, &algo_name)) { *err_msgp = "Can't get hash algo property"; return -1; |