summaryrefslogtreecommitdiffstats
path: root/drivers/misc/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/state.c')
-rw-r--r--drivers/misc/state.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/state.c b/drivers/misc/state.c
index b43aee6..98ed42e 100644
--- a/drivers/misc/state.c
+++ b/drivers/misc/state.c
@@ -26,6 +26,7 @@ static int state_probe(struct device_d *dev)
struct device_node *np = dev->device_node;
struct state *state;
bool readonly = false;
+ int ret;
state = state_new_from_node(np, NULL, 0, 0, readonly);
if (IS_ERR(state)) {
@@ -35,6 +36,11 @@ static int state_probe(struct device_d *dev)
return ret;
}
+ ret = state_load(state);
+ if (ret)
+ dev_warn(dev, "Failed to load persistent state, continuing with defaults, %d\n",
+ ret);
+
return 0;
}