clk: qcom: krait-cc: use devm variant for clk notifier register

Message ID 20221108215827.30475-1-ansuelsmth@gmail.com
State New
Headers
Series clk: qcom: krait-cc: use devm variant for clk notifier register |

Commit Message

Christian Marangi Nov. 8, 2022, 9:58 p.m. UTC
  Use devm variant for clk notifier register and correctly handle free
resource on driver remove.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 drivers/clk/qcom/krait-cc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Bjorn Andersson Dec. 2, 2022, 8:58 p.m. UTC | #1
On Tue, 8 Nov 2022 22:58:27 +0100, Christian Marangi wrote:
> Use devm variant for clk notifier register and correctly handle free
> resource on driver remove.
> 
> 

Applied, thanks!

[1/1] clk: qcom: krait-cc: use devm variant for clk notifier register
      commit: 3198106a99e73dbc4c02bd5128cec0997c73af82

Best regards,
  

Patch

diff --git a/drivers/clk/qcom/krait-cc.c b/drivers/clk/qcom/krait-cc.c
index e91275663973..33a78b7de0bd 100644
--- a/drivers/clk/qcom/krait-cc.c
+++ b/drivers/clk/qcom/krait-cc.c
@@ -64,7 +64,7 @@  static int krait_notifier_register(struct device *dev, struct clk *clk,
 	int ret = 0;
 
 	mux->clk_nb.notifier_call = krait_notifier_cb;
-	ret = clk_notifier_register(clk, &mux->clk_nb);
+	ret = devm_clk_notifier_register(dev, clk, &mux->clk_nb);
 	if (ret)
 		dev_err(dev, "failed to register clock notifier: %d\n", ret);