regulator: of: Decrement refcount for suspend state nodes
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Mon, 20 Oct 2014 14:47:48 +0000 (16:47 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 22 Oct 2014 16:34:36 +0000 (17:34 +0100)
commit4eafec83aa9ea8eb21bd5c1c980debc623eea164
tree1e09598e11e333ac28427def0e93ce7daa04fc2d
parent291d761c16c9dc05050a92679c6aa92f263c4f51
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>
drivers/regulator/of_regulator.c