Skip to content

Commit 423a116

Browse files
frowandbroonie
authored andcommitted
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 <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 5771a8c commit 423a116

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/of_regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
333333
search = of_get_child_by_name(dev->of_node,
334334
desc->regulators_node);
335335
else
336-
search = dev->of_node;
336+
search = of_node_get(dev->of_node);
337337

338338
if (!search) {
339339
dev_dbg(dev, "Failed to find regulator container node '%s'\n",

0 commit comments

Comments
 (0)