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: 2dc51ca822 ("clk: RK808: Reduce 'struct rk808' usage")
Cc: stable@vger.kernel.org	# 6.5
Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
master
Johan Hovold 2026-04-07 11:50:27 +02:00 committed by Stephen Boyd
parent 6905675323
commit de019f203b
No known key found for this signature in database
GPG Key ID: AD028897C6E49525
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ static int rk808_clkout_probe(struct platform_device *pdev)
struct rk808_clkout *rk808_clkout; struct rk808_clkout *rk808_clkout;
int ret; int ret;
dev->of_node = pdev->dev.parent->of_node; device_set_of_node_from_dev(dev, dev->parent);
rk808_clkout = devm_kzalloc(dev, rk808_clkout = devm_kzalloc(dev,
sizeof(*rk808_clkout), GFP_KERNEL); sizeof(*rk808_clkout), GFP_KERNEL);