Unverified Commit de019f20 authored by Johan Hovold's avatar Johan Hovold Committed by Stephen Boyd
Browse files

clk: rk808: 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: 2dc51ca8 ("clk: RK808: Reduce 'struct rk808' usage")
Cc: stable@vger.kernel.org	# 6.5
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: default avatarBrian Masney <bmasney@redhat.com>
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 69056753
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ static int rk808_clkout_probe(struct platform_device *pdev)
	struct rk808_clkout *rk808_clkout;
	int ret;

	dev->of_node = pdev->dev.parent->of_node;
	device_set_of_node_from_dev(dev, dev->parent);

	rk808_clkout = devm_kzalloc(dev,
				    sizeof(*rk808_clkout), GFP_KERNEL);