summaryrefslogtreecommitdiff
path: root/drivers/regulator/da9052-regulator.c
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2014-09-10 11:50:39 +0800
committerMark Brown <broonie@kernel.org>2014-09-10 11:35:02 +0100
commitb8b27a44ddf1987e9bae84b99741b0a61192e017 (patch)
tree8516c54902fe34fc84693686bd90b06413390d8e /drivers/regulator/da9052-regulator.c
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
regulator: remove unnecessary of_node_get() to parent
These of_node_get() were added to balance refcount decrements inside of of_find_node_by_name(). See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()") However of_find_node_by_name() was then replaced by of_get_child_by_name(), which doesn't call of_node_put() against its input parameter. So, need to remove these unnecessary of_node_get() calls. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/da9052-regulator.c')
-rw-r--r--drivers/regulator/da9052-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index fdb6ea8ae7e6..00033625a09c 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -422,9 +422,9 @@ static int da9052_regulator_probe(struct platform_device *pdev)
config.init_data = pdata->regulators[pdev->id];
} else {
#ifdef CONFIG_OF
- struct device_node *nproot, *np;
+ struct device_node *nproot = da9052->dev->of_node;
+ struct device_node *np;
- nproot = of_node_get(da9052->dev->of_node);
if (!nproot)
return -ENODEV;