[PATCH 2/3] regulator: mt6357: fix OF node reference imbalance

From: Johan Hovold

Date: Tue Apr 07 2026 - 08:27:45 EST


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: dafc7cde23dc ("regulator: add mt6357 regulator")
Cc: stable@xxxxxxxxxxxxxxx # 6.2
Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
---
drivers/regulator/mt6357-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/mt6357-regulator.c b/drivers/regulator/mt6357-regulator.c
index 1eb69c7a6acb..09feb454ab6b 100644
--- a/drivers/regulator/mt6357-regulator.c
+++ b/drivers/regulator/mt6357-regulator.c
@@ -410,7 +410,7 @@ static int mt6357_regulator_probe(struct platform_device *pdev)
struct regulator_dev *rdev;
int i;

- pdev->dev.of_node = pdev->dev.parent->of_node;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);

for (i = 0; i < MT6357_MAX_REGULATOR; i++) {
config.dev = &pdev->dev;
--
2.52.0