diff options
Diffstat (limited to 'drivers/regulator/88pm8607.c')
-rw-r--r-- | drivers/regulator/88pm8607.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index 2b557119adad..e99a3e48b880 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -372,7 +372,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev, | |||
372 | struct regulator_config *config) | 372 | struct regulator_config *config) |
373 | { | 373 | { |
374 | struct device_node *nproot, *np; | 374 | struct device_node *nproot, *np; |
375 | nproot = pdev->dev.parent->of_node; | 375 | nproot = of_node_get(pdev->dev.parent->of_node); |
376 | if (!nproot) | 376 | if (!nproot) |
377 | return -ENODEV; | 377 | return -ENODEV; |
378 | nproot = of_find_node_by_name(nproot, "regulators"); | 378 | nproot = of_find_node_by_name(nproot, "regulators"); |
@@ -388,6 +388,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev, | |||
388 | break; | 388 | break; |
389 | } | 389 | } |
390 | } | 390 | } |
391 | of_node_put(nproot); | ||
391 | return 0; | 392 | return 0; |
392 | } | 393 | } |
393 | #else | 394 | #else |