summaryrefslogtreecommitdiff
path: root/drivers/cpuidle/dt_idle_states.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpuidle/dt_idle_states.c')
-rw-r--r--drivers/cpuidle/dt_idle_states.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c
index ffca4fc0061d..ae8eb0359889 100644
--- a/drivers/cpuidle/dt_idle_states.c
+++ b/drivers/cpuidle/dt_idle_states.c
@@ -180,8 +180,10 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
if (!state_node)
break;
- if (!of_device_is_available(state_node))
+ if (!of_device_is_available(state_node)) {
+ of_node_put(state_node);
continue;
+ }
if (!idle_state_valid(state_node, i, cpumask)) {
pr_warn("%s idle state not valid, bailing out\n",