arm: imx: Use log_err for errors in read_auth_container

To allow for more flexible handling of errors, use log_err instead of
printf.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
This commit is contained in:
Sean Anderson
2023-10-14 16:47:42 -04:00
committed by Tom Rini
parent 14399638c6
commit d9416cc449

View File

@@ -3,6 +3,7 @@
* Copyright 2018-2021 NXP * Copyright 2018-2021 NXP
*/ */
#define LOG_CATEGORY LOGC_ARCH
#include <common.h> #include <common.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
@@ -85,13 +86,13 @@ static int read_auth_container(struct spl_image_info *spl_image,
} }
if (container->tag != 0x87 && container->version != 0x0) { if (container->tag != 0x87 && container->version != 0x0) {
printf("Wrong container header\n"); log_err("Wrong container header\n");
ret = -ENOENT; ret = -ENOENT;
goto end; goto end;
} }
if (!container->num_images) { if (!container->num_images) {
printf("Wrong container, no image found\n"); log_err("Wrong container, no image found\n");
ret = -ENOENT; ret = -ENOENT;
goto end; goto end;
} }