Skip to contentSkip to conversation

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

PATCH Applied Christian Marangi 2 participants 2 messages Nov 8, 2022 – Dec 2, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

Use devm variant for clk notifier register and correctly handle free resource on driver remove.

---
 drivers/clk/qcom/krait-cc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/qcom/krait-cc.c +1 -1
index e91275663973..33a78b7de0bd 100644
@@ -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);
 
Signature · 1 line
2.37.2
maintainer Applied
#1 lore raw
Quoted 4 lines · Christian Marangi

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,

Signature · 1 line
Bjorn Andersson <[email protected]>