diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/state.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/misc/state.c b/drivers/misc/state.c index b43aee60fe..98ed42e757 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; } |