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 2b55711..e99a3e4 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, struct regulator_config *config) { struct device_node *nproot, *np; - nproot = pdev->dev.parent->of_node; + nproot = of_node_get(pdev->dev.parent->of_node); if (!nproot) return -ENODEV; nproot = of_find_node_by_name(nproot, "regulators"); @@ -388,6 +388,7 @@ static int pm8607_regulator_dt_init(struct platform_device *pdev, break; } } + of_node_put(nproot); return 0; } #else |