diff options
author | Liang He <windhl@126.com> | 2022-06-22 06:48:16 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-06-30 15:25:37 +0300 |
commit | a9e37a828ca069802b2f817e3cbf791b3806c97c (patch) | |
tree | 8257e7a2f4988aa7f888f792220e331262244acf | |
parent | 46ae6fb58fd49c4cb2d1ca34e87d603b7c96ba97 (diff) | |
download | linux-a9e37a828ca069802b2f817e3cbf791b3806c97c.tar.xz |
regulator: scmi: Add missing of_node_get()
In scmi_regulator_probe(), of_find_node_by_name() will decrease
the refcount of its first argument and we need a of_node_get()
to keep reference balance.
Signed-off-by: Liang He <windhl@126.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20220622034816.4094043-1-windhl@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/scmi-regulator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/scmi-regulator.c b/drivers/regulator/scmi-regulator.c index 41ae7ac27ff6..b9918f4fd241 100644 --- a/drivers/regulator/scmi-regulator.c +++ b/drivers/regulator/scmi-regulator.c @@ -343,6 +343,7 @@ static int scmi_regulator_probe(struct scmi_device *sdev) * plausible SCMI Voltage Domain number, all belonging to this SCMI * platform instance node (handle->dev->of_node). */ + of_node_get(handle->dev->of_node); np = of_find_node_by_name(handle->dev->of_node, "regulators"); for_each_child_of_node(np, child) { ret = process_scmi_regulator_of_node(sdev, ph, child, rinfo); |