aboutsummaryrefslogtreecommitdiffstats
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 d0963090442d..29d194c8a310 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)
395 config.init_data = pdata->regulators[pdev->id]; 395 config.init_data = pdata->regulators[pdev->id];
396 } else { 396 } else {
397#ifdef CONFIG_OF 397#ifdef CONFIG_OF
398 struct device_node *nproot = da9052->dev->of_node; 398 struct device_node *nproot, *np;
399 struct device_node *np;
400 399
400 nproot = of_node_get(da9052->dev->of_node);
401 if (!nproot) 401 if (!nproot)
402 return -ENODEV; 402 return -ENODEV;
403 403
@@ -414,6 +414,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
414 break; 414 break;
415 } 415 }
416 } 416 }
417 of_node_put(nproot);
417#endif 418#endif
418 } 419 }
419 420