diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-29 14:34:05 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-31 13:57:58 +0200 |
commit | 99335922839a3f11895d0f8c2424a9bed61d5da1 (patch) | |
tree | a176c16bf8c71d7d4c696635b12e23dc1286ad8b /src/barebox-state.c | |
parent | 6763c6e9536b1c07609b3ae1a00fb419eb35f3f3 (diff) | |
download | dt-utils-99335922839a3f11895d0f8c2424a9bed61d5da1.tar.gz dt-utils-99335922839a3f11895d0f8c2424a9bed61d5da1.tar.xz |
state: Do not load state during state_new_from_node
The caller of state_new_from_node() may have it's own ideas what to
do when loading the state fails, so do not load it in the initialization
function, but instead let the caller do it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'src/barebox-state.c')
-rw-r--r-- | src/barebox-state.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/barebox-state.c b/src/barebox-state.c index a40b32d..5399209 100644 --- a/src/barebox-state.c +++ b/src/barebox-state.c @@ -368,6 +368,10 @@ struct state *state_get(const char *name, bool readonly) return ERR_CAST(state); } + ret = state_load(state); + if (ret) + pr_err("Failed to load persistent state, continuing with defaults, %d\n", ret); + return state; } |