diff mbox series

[v2,06/29] arm: imx: Use log_err for errors in read_auth_container

Message ID 20231014204805.439009-7-seanga2@gmail.com
State Accepted
Commit d9416cc4498d1aa8635597e74a05063a04ca9b58
Delegated to: Tom Rini
Headers show
Series test: spl: Test some load methods | expand

Commit Message

Sean Anderson Oct. 14, 2023, 8:47 p.m. UTC
To allow for more flexible handling of errors, use log_err instead of
printf.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

Changes in v2:
- New

 arch/arm/mach-imx/parse-container.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/parse-container.c b/arch/arm/mach-imx/parse-container.c
index c5df78d1c58..48cffb3ab4d 100644
--- a/arch/arm/mach-imx/parse-container.c
+++ b/arch/arm/mach-imx/parse-container.c
@@ -3,6 +3,7 @@ 
  * Copyright 2018-2021 NXP
  */
 
+#define LOG_CATEGORY LOGC_ARCH
 #include <common.h>
 #include <stdlib.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) {
-		printf("Wrong container header\n");
+		log_err("Wrong container header\n");
 		ret = -ENOENT;
 		goto end;
 	}
 
 	if (!container->num_images) {
-		printf("Wrong container, no image found\n");
+		log_err("Wrong container, no image found\n");
 		ret = -ENOENT;
 		goto end;
 	}