summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Ölmann <u.oelmann@pengutronix.de>2018-12-18 14:57:31 +0100
committerRoland Hieber <rhi@pengutronix.de>2019-01-07 12:26:49 +0100
commit2ed85da806b09c2da95c31df720c99460c3893d5 (patch)
treec2d82dc6106a5bcd688bde5c143bc7e36e4506a3
parente51096e54f8638f8b657d594b4cc81e3dda8870c (diff)
downloaddt-utils-2ed85da806b09c2da95c31df720c99460c3893d5.tar.gz
dt-utils-2ed85da806b09c2da95c31df720c99460c3893d5.tar.xz
state: Fix error return value
This ports the following barebox commit: | commit d11584df3d8c311f8d12a16badc8fbe18e592f87 | Author: Sascha Hauer <s.hauer@pengutronix.de> | Date: Wed Apr 19 14:34:30 2017 +0200 | | state: Fix error return value | | 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> Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
-rw-r--r--src/barebox-state/state.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/barebox-state/state.c b/src/barebox-state/state.c
index a0a3901..9c4edb3 100644
--- a/src/barebox-state/state.c
+++ b/src/barebox-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;
}