This is a note to let you know that I've just added the patch titled PM / devfreq: Fix kernel warning with cpufreq passive register fail to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: pm-devfreq-fix-kernel-warning-with-cpufreq-passive-r.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit a53d3ccecf54330cba08207ee470a3456b785b13 Author: Christian Marangi <ansuelsmth@xxxxxxxxx> Date: Mon Jun 20 00:29:39 2022 +0200 PM / devfreq: Fix kernel warning with cpufreq passive register fail [ Upstream commit 82c66d2bbbeda9e493487e7413769087a0b46250 ] 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: a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor") Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx> Signed-off-by: Chanwoo Choi <cw00.choi@xxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c index 9997332af3df..c516d3733267 100644 --- a/drivers/devfreq/governor_passive.c +++ b/drivers/devfreq/governor_passive.c @@ -293,7 +293,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; }