mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] state: Fix error return value
@ 2017-04-19 13:43 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2017-04-19 13:43 UTC (permalink / raw)
  To: Barebox List

When the backend phandle cannot be resolved we jump to the error
return path without initializing ret. Fix this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/state/state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/common/state/state.c b/common/state/state.c
index 8369aedac6..6db77f2c18 100644
--- a/common/state/state.c
+++ b/common/state/state.c
@@ -577,6 +577,7 @@ struct state *state_new_from_node(struct device_node *node, char *path,
 		partition_node = of_parse_phandle(node, "backend", 0);
 		if (!partition_node) {
 			dev_err(&state->dev, "Cannot resolve \"backend\" phandle\n");
+			ret = -EINVAL;
 			goto out_release_state;
 		}
 
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-19 13:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 13:43 [PATCH] state: Fix error return value Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox