Skip to content

Commit 8498100

Browse files
jhovoldbroonie
authored andcommitted
regulator: bd9571mwv: fix OF node reference imbalance
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: e85c5a1 ("regulator: Add ROHM BD9571MWV-M PMIC regulator driver") Cc: stable@vger.kernel.org # 4.12 Cc: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260408073055.5183-8-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0d15ce3 commit 8498100

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/regulator/bd9571mwv-regulator.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,9 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
287287

288288
platform_set_drvdata(pdev, bdreg);
289289

290+
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
291+
290292
config.dev = &pdev->dev;
291-
config.dev->of_node = pdev->dev.parent->of_node;
292293
config.driver_data = bdreg;
293294
config.regmap = bdreg->regmap;
294295

0 commit comments

Comments
 (0)