diff options
Diffstat (limited to 'arch/riscv/lib/image.c')
-rw-r--r-- | arch/riscv/lib/image.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/riscv/lib/image.c b/arch/riscv/lib/image.c index 859326cbac8..a82f48e9a50 100644 --- a/arch/riscv/lib/image.c +++ b/arch/riscv/lib/image.c @@ -32,13 +32,6 @@ struct linux_image_h { uint32_t res4; /* reserved */ }; -bool booti_is_valid(const void *img) -{ - const struct linux_image_h *lhdr = img; - - return lhdr->magic == LINUX_RISCV_IMAGE_MAGIC; -} - int booti_setup(ulong image, ulong *relocated_addr, ulong *size, bool force_reloc) { @@ -46,7 +39,7 @@ int booti_setup(ulong image, ulong *relocated_addr, ulong *size, lhdr = (struct linux_image_h *)map_sysmem(image, 0); - if (!booti_is_valid(lhdr)) { + if (lhdr->magic != LINUX_RISCV_IMAGE_MAGIC) { puts("Bad Linux RISCV Image magic!\n"); return -EINVAL; } |