This ports the following barebox commit

| commit 2628c8a8e1eee3cf6727c0c8a99ff5eec8ba4d1e
| Author: Ahmad Fatoum <a.fat...@pengutronix.de>
| Date:   Mon Sep 5 11:55:35 2022 +0200
|
|     state: propagate failure to fixup enum32 into DT
|
|     We assign to ret, but don't use the value anywhere laments the static
|     analyzer. Remedy that.
|
|     Signed-off-by: Ahmad Fatoum <a.fat...@pengutronix.de>
|     Link: 
https://lore.barebox.org/20220905095557.596891-11-a.fat...@pengutronix.de
|     Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>

Signed-off-by: Marco Felsch <m.fel...@pengutronix.de>
---
 src/barebox-state/state_variables.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/barebox-state/state_variables.c 
b/src/barebox-state/state_variables.c
index 66c66f3..5d86900 100644
--- a/src/barebox-state/state_variables.c
+++ b/src/barebox-state/state_variables.c
@@ -180,6 +180,8 @@ static int state_enum32_export(struct state_variable *var,
                str += sprintf(str, "%s", enum32->names[i]) + 1;
 
        ret = of_set_property(node, "names", prop, len, 1);
+       if (ret)
+               return ret;
 
        free(prop);
 
-- 
2.30.2


Reply via email to