Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690828

[PATCH] regulator: of: regulator_of_get_init_data() missing of_node_get()

From frowand.list@gmail.com
Newsgroups linux.kernel
Subject [PATCH] regulator: of: regulator_of_get_init_data() missing of_node_get()
Date 2017-07-19 01:40 +0200
Message-ID <u4KfT-qt-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Frank Rowand <frank.rowand@sony.com>

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>
---
 drivers/regulator/of_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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",
-- 
Frank Rowand <frank.rowand@sony.com>

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] regulator: of: regulator_of_get_init_data() missing of_node_get() frowand.list@gmail.com - 2017-07-19 01:40 +0200
  Applied "regulator: of: regulator_of_get_init_data() missing of_node_get()" to the regulator tree Mark Brown <broonie@kernel.org> - 2017-07-19 13:30 +0200

csiph-web