[PATCH v2 21/36] expo: Correct some swallowed errors in scene

Simon Glass sjg at chromium.org
Mon Oct 2 03:13:25 CEST 2023


Return the reported error, rather than assuming it is -ENOMEM

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 boot/scene.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/boot/scene.c b/boot/scene.c
index 08ed85e9188c..9c4466c1a47a 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -137,7 +137,7 @@ int scene_img(struct scene *scn, const char *name, uint id, char *data,
 			    sizeof(struct scene_obj_img),
 			    (struct scene_obj **)&img);
 	if (ret < 0)
-		return log_msg_ret("obj", -ENOMEM);
+		return log_msg_ret("obj", ret);
 
 	img->data = data;
 
@@ -157,7 +157,7 @@ int scene_txt(struct scene *scn, const char *name, uint id, uint str_id,
 			    sizeof(struct scene_obj_txt),
 			    (struct scene_obj **)&txt);
 	if (ret < 0)
-		return log_msg_ret("obj", -ENOMEM);
+		return log_msg_ret("obj", ret);
 
 	txt->str_id = str_id;
 
@@ -183,7 +183,7 @@ int scene_txt_str(struct scene *scn, const char *name, uint id, uint str_id,
 			    sizeof(struct scene_obj_txt),
 			    (struct scene_obj **)&txt);
 	if (ret < 0)
-		return log_msg_ret("obj", -ENOMEM);
+		return log_msg_ret("obj", ret);
 
 	txt->str_id = str_id;
 
-- 
2.42.0.582.g8ccd20d70d-goog



More information about the U-Boot mailing list