Skip to content

Commit

Permalink
PM / devfreq: Fix kernel warning with cpufreq passive register fail
Browse files Browse the repository at this point in the history
Remove cpufreq_passive_unregister_notifier from
cpufreq_passive_register_notifier in case of error as devfreq core
already call unregister on GOV_START fail.

This fix the kernel always printing a WARN on governor PROBE_DEFER as
cpufreq_passive_unregister_notifier is called two times and return
error on the second call as the cpufreq is already unregistered.

Fixes: a03dacb ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
  • Loading branch information
Christian Marangi authored and Chanwoo Choi committed Jun 29, 2022
1 parent b5d281f commit 82c66d2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/devfreq/governor_passive.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ static int cpufreq_passive_register_notifier(struct devfreq *devfreq)
err_put_policy:
cpufreq_cpu_put(policy);
err:
WARN_ON(cpufreq_passive_unregister_notifier(devfreq));

return ret;
}
Expand Down

0 comments on commit 82c66d2

Please sign in to comment.