Skip to content

Commit 33a1054

Browse files
jhovoldopsiff
authored andcommitted
regulator: max77650: fix OF node reference imbalance
commit 2edaf5f upstream. 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: bcc61f1 ("regulator: max77650: add regulator support") Cc: stable@vger.kernel.org # 5.1 Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20260408073055.5183-4-johan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit cd8f1633c3e85be14f60fe4bfd7eb002d532fe65) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 8ddcdde commit 33a1054

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/regulator/max77650-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ static int max77650_regulator_probe(struct platform_device *pdev)
339339
parent = dev->parent;
340340

341341
if (!dev->of_node)
342-
dev->of_node = parent->of_node;
342+
device_set_of_node_from_dev(dev, parent);
343343

344344
rdescs = devm_kcalloc(dev, MAX77650_REGULATOR_NUM_REGULATORS,
345345
sizeof(*rdescs), GFP_KERNEL);

0 commit comments

Comments
 (0)