diff options
author | Javier Martinez Canillas <javier.martinez@collabora.co.uk> | 2014-10-20 16:47:48 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-22 17:34:36 +0100 |
commit | 4eafec83aa9ea8eb21bd5c1c980debc623eea164 (patch) | |
tree | 1e09598e11e333ac28427def0e93ce7daa04fc2d /drivers/regulator | |
parent | 291d761c16c9dc05050a92679c6aa92f263c4f51 (diff) | |
download | talos-op-linux-4eafec83aa9ea8eb21bd5c1c980debc623eea164.tar.gz talos-op-linux-4eafec83aa9ea8eb21bd5c1c980debc623eea164.zip |
regulator: of: Decrement refcount for suspend state nodes
of_get_regulation_constraints() calls of_get_child_by_name() to find the
regulator-state-{mem,disk} child nodes for each regulator. This function
increments the device node reference counter but this is not decremented
once the function is done using the node.
Fix that by calling of_node_put() after finishing using the device node.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/of_regulator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index b375ffe40df1..f0d19fc9d5d5 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -107,6 +107,7 @@ static void of_get_regulation_constraints(struct device_node *np, "regulator-off-in-suspend")) suspend_state->disabled = true; + of_node_put(suspend_np); suspend_state = NULL; suspend_np = NULL; } |