diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2017-06-11 14:28:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-13 19:50:21 +0200 |
commit | d7c0ef3478cab074ec59d42ba7e5db70c198ae50 (patch) | |
tree | 6c978d239a6d5b4f7de925905a2ed1b107ccdcf8 | |
parent | 4bd783a46caff12880f934aad3fb624aa9ca2cd8 (diff) | |
download | linux-stable-d7c0ef3478cab074ec59d42ba7e5db70c198ae50.tar.gz linux-stable-d7c0ef3478cab074ec59d42ba7e5db70c198ae50.tar.bz2 linux-stable-d7c0ef3478cab074ec59d42ba7e5db70c198ae50.zip |
cpuidle: dt: Add missing 'of_node_put()'
[ Upstream commit b2cdd8e1b54849477a32d820acc2e87828a38f3d ]
'of_node_put()' should be called on pointer returned by
'of_parse_phandle()' when done. In this function this is done in all path
except this 'continue', so add it.
Fixes: 97735da074fd (drivers: cpuidle: Add status property to ARM idle states)
Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/cpuidle/dt_idle_states.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/cpuidle/dt_idle_states.c b/drivers/cpuidle/dt_idle_states.c index a5c111b67f37..ea11a33e7fff 100644 --- a/drivers/cpuidle/dt_idle_states.c +++ b/drivers/cpuidle/dt_idle_states.c @@ -174,8 +174,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", |