From: Johan Hovold <johan@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Bartosz Golaszewski" <brgl@kernel.org>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"André Draszik" <andre.draszik@linaro.org>,
linux-kernel@vger.kernel.org, "Johan Hovold" <johan@kernel.org>,
stable@vger.kernel.org
Subject: [PATCH 1/3] regulator: max77650: fix OF node reference imbalance
Date: Tue, 7 Apr 2026 14:20:29 +0200 [thread overview]
Message-ID: <20260407122031.2669397-2-johan@kernel.org> (raw)
In-Reply-To: <20260407122031.2669397-1-johan@kernel.org>
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: bcc61f1c44fd ("regulator: max77650: add regulator support")
Cc: stable@vger.kernel.org # 5.1
Cc: Bartosz Golaszewski <brgl@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/regulator/max77650-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max77650-regulator.c b/drivers/regulator/max77650-regulator.c
index a809264c77fc..11b04a13f889 100644
--- a/drivers/regulator/max77650-regulator.c
+++ b/drivers/regulator/max77650-regulator.c
@@ -337,7 +337,7 @@ static int max77650_regulator_probe(struct platform_device *pdev)
parent = dev->parent;
if (!dev->of_node)
- dev->of_node = parent->of_node;
+ device_set_of_node_from_dev(dev, parent);
rdescs = devm_kcalloc(dev, MAX77650_REGULATOR_NUM_REGULATORS,
sizeof(*rdescs), GFP_KERNEL);
--
2.52.0
next parent reply other threads:[~2026-04-07 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260407122031.2669397-1-johan@kernel.org>
2026-04-07 12:20 ` Johan Hovold [this message]
2026-04-07 12:35 ` [PATCH 1/3] regulator: max77650: fix OF node reference imbalance Bartosz Golaszewski
2026-04-07 12:20 ` [PATCH 2/3] regulator: mt6357: " Johan Hovold
2026-04-07 12:20 ` [PATCH 3/3] regulator: s2dos05: " Johan Hovold
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=20260407122031.2669397-2-johan@kernel.org \
--to=johan@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=stable@vger.kernel.org \
/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