Skip to content

Commit 4baa408

Browse files
jhovoldgregkh
authored andcommitted
clk: rk808: fix OF node reference imbalance
commit de019f2 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: 2dc51ca ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f98cf50 commit 4baa408

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/clk/clk-rk808.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int rk808_clkout_probe(struct platform_device *pdev)
153153
struct rk808_clkout *rk808_clkout;
154154
int ret;
155155

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

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

0 commit comments

Comments
 (0)