Unverified Commit 2edaf5f7 authored by Johan Hovold's avatar Johan Hovold Committed by Mark Brown
Browse files

regulator: max77650: 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: bcc61f1c ("regulator: max77650: add regulator support")
Cc: stable@vger.kernel.org	# 5.1
Reviewed-by: default avatarBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20260408073055.5183-4-johan@kernel.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 65290b24
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -337,7 +337,7 @@ static int max77650_regulator_probe(struct platform_device *pdev)
	parent = dev->parent;

	if (!dev->of_node)
		dev->of_node = parent->of_node;
		device_set_of_node_from_dev(dev, parent);

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