aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/da9052-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/da9052-regulator.c')
-rw-r--r--drivers/regulator/da9052-regulator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index d0963090442..29d194c8a31 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -395,9 +395,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 = da9052->dev->of_node;
- struct device_node *np;
+ struct device_node *nproot, *np;
+ nproot = of_node_get(da9052->dev->of_node);
if (!nproot)
return -ENODEV;
@@ -414,6 +414,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
break;
}
}
+ of_node_put(nproot);
#endif
}