Skip to content

Commit 2f38e96

Browse files
jhovoldbroonie
authored andcommitted
regulator: mt6357: 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: dafc7cd ("regulator: add mt6357 regulator") Cc: stable@vger.kernel.org # 6.2 Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260408073055.5183-5-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2edaf5f commit 2f38e96

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/mt6357-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ static int mt6357_regulator_probe(struct platform_device *pdev)
410410
struct regulator_dev *rdev;
411411
int i;
412412

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

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

0 commit comments

Comments
 (0)