spl: fit: print invalid fit magic

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I89da3797e444bb12e58cf99f902cb758c6fd82f9
This commit is contained in:
Joseph Chen 2020-08-20 14:49:19 +08:00
parent d8d99fce60
commit 29725e8530
1 changed files with 2 additions and 2 deletions

View File

@ -459,12 +459,12 @@ static int spl_load_kernel_fit(struct spl_image_info *spl_image,
sector = CONFIG_SPL_KERNEL_BOOT_SECTOR;
#endif
if (info->read(info, sector, 1, &fit_header) != 1) {
debug("%s: no memory\n", __func__);
debug("%s: Failed to read header\n", __func__);
return -EIO;
}
if (image_get_magic((void *)&fit_header) != FDT_MAGIC) {
debug("%s: Not fit magic\n", __func__);
printf("%s: Not fit magic\n", __func__);
return -EINVAL;
}