Skip to content

Commit ebe694d

Browse files
jhovoldbroonie
authored andcommitted
regulator: s2dos05: 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: bb24414 ("regulator: add s2dos05 regulator support") Cc: stable@vger.kernel.org # 6.18 Cc: Dzmitry Sankouski <dsankouski@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260408073055.5183-6-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2f38e96 commit ebe694d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/s2dos05-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static int s2dos05_pmic_probe(struct platform_device *pdev)
126126
s2dos05->regmap = iodev->regmap_pmic;
127127
s2dos05->dev = dev;
128128
if (!dev->of_node)
129-
dev->of_node = dev->parent->of_node;
129+
device_set_of_node_from_dev(dev, dev->parent);
130130

131131
config.dev = dev;
132132
config.driver_data = s2dos05;

0 commit comments

Comments
 (0)