regulator: rk808: Fix missing of_node_put
authorAxel Lin <axel.lin@ingics.com>
Thu, 11 Sep 2014 10:22:48 +0000 (18:22 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 12 Sep 2014 13:53:09 +0000 (14:53 +0100)
commit1ed3f8ce8399255c7cca43dde5d3a19b2b7dc287
treea570cb6242abc1969934772843c5e727aefbf678
parent1f0c01621aa1beb0f6bc205beeada2a4a3178d5a
regulator: rk808: Fix missing of_node_put

1. Pass &pdev->dev rather than &client->dev to of_regulator_match, the *dev
   argument is used for devres to ensure devm_of_regulator_put_matches() will
   be called when unload the module.

2. of_get_child_by_name() returns a node pointer with refcount incremented.
   Thus add missing of_node_put(reg_np).

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/rk808-regulator.c