[PATCH 10/32] state: propagate failure to fixup enum32 into DT

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 5 02:55:35 PDT 2022


We assign to ret, but don't use the value anywhere laments the static
analyzer. Remedy that.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 common/state/state_variables.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/common/state/state_variables.c b/common/state/state_variables.c
index f112c60bf602..cb85f3a92602 100644
--- a/common/state/state_variables.c
+++ b/common/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




More information about the barebox mailing list