From: Liang He <windhl@126.com>
To: sudeep.holla@arm.com, cristian.marussi@arm.com,
lgirdwood@gmail.com, broonie@kernel.org
Cc: windhl@126.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH] regulator/scmi: Add missing of_node_get()
Date: Wed, 22 Jun 2022 11:48:16 +0800 [thread overview]
Message-ID: <20220622034816.4094043-1-windhl@126.com> (raw)
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>
---
drivers/regulator/scmi-regulator.c | 1 +
1 file changed, 1 insertion(+)
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);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-06-22 3:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-22 3:48 Liang He [this message]
2022-06-22 8:04 ` [PATCH] regulator/scmi: Add missing of_node_get() Cristian Marussi
2022-06-22 8:22 ` Liang He
2022-06-30 13:32 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220622034816.4094043-1-windhl@126.com \
--to=windhl@126.com \
--cc=broonie@kernel.org \
--cc=cristian.marussi@arm.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox