summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
authorFrank Rowand <frank.rowand@sony.com>2017-07-18 16:36:37 -0700
committerMark Brown <broonie@kernel.org>2017-07-19 12:25:35 +0100
commit423a11647c53e9d7ebbea1c61bc469ea13dafeff (patch)
tree51f6c87681c15ff154726fd934cabc2ebe5f2241 /drivers/regulator/of_regulator.c
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877 (diff)
downloadlinux-stable-423a11647c53e9d7ebbea1c61bc469ea13dafeff.tar.gz
linux-stable-423a11647c53e9d7ebbea1c61bc469ea13dafeff.tar.bz2
linux-stable-423a11647c53e9d7ebbea1c61bc469ea13dafeff.zip
regulator: of: regulator_of_get_init_data() missing of_node_get()
Boot fails for qcom-apq8074-dragonboard on 4.13-rc1 with error: OF: ERROR: Bad of_node_put() on /soc/spmi@fc4cf000/pm8941@1/regulators The error will occur if the configuration is set to: CONFIG_OF_OVERLAY y CONFIG_OF_UNITTEST y CONFIG_OF_DYNAMIC y CONFIG_OF_RESOLVE y If CONFIG_OF_DYNAMIC is enabled then of_node_release() detects an attempt to release a node that is still attached to the device tree. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 96bf75458da5..9dd44dd4cdf6 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -333,7 +333,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
search = of_get_child_by_name(dev->of_node,
desc->regulators_node);
else
- search = dev->of_node;
+ search = of_node_get(dev->of_node);
if (!search) {
dev_dbg(dev, "Failed to find regulator container node '%s'\n",