mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
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. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221108215827.30475-1-ansuelsmth@gmail.com
This commit is contained in:
parent
d676d3a371
commit
3198106a99
|
|
@ -62,7 +62,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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user