diff mbox series

[RFC,v2,4/4] clk: use clk_core_unlink_consumer() helper

Message ID 20220531124554.275682-5-nuno.sa@analog.com (mailing list archive)
State Superseded, archived
Headers show
Series Dynamic OF and use after free related fixes | expand

Commit Message

Nuno Sa May 31, 2022, 12:45 p.m. UTC
There is an helper to remove a consumer from the clk provider list.
Hence, let's use it when releasing a consumer.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index a18f78f1ebca..022beb868894 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -4418,7 +4418,7 @@  void __clk_put(struct clk *clk)
 		clk->exclusive_count = 0;
 	}
 
-	hlist_del(&clk->clks_node);
+	clk_core_unlink_consumer(clk);
 	if (clk->min_rate > clk->core->req_rate ||
 	    clk->max_rate < clk->core->req_rate)
 		clk_core_set_rate_nolock(clk->core, clk->core->req_rate);