Skip to content

Commit 77cf053

Browse files
Lifeng Zhengrafaeljw
authored andcommitted
cpufreq: Return -EOPNOTSUPP if no policy supports boost
In cpufreq_boost_trigger_state(), if none of the the policies support boost, policy_set_boost() will not be called and this function will return 0. But it is better to return an error to indicate that the platform doesn't support boost. Signed-off-by: Lifeng Zheng <zhenglifeng1@huawei.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Jie Zhan <zhanjie9@hisilicon.com> [ rjw: Subject and changelog edits ] Link: https://patch.msgid.link/20251202072727.1368285-2-zhenglifeng1@huawei.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8f0b4cc commit 77cf053

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/cpufreq/cpufreq.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2803,7 +2803,7 @@ static int cpufreq_boost_trigger_state(int state)
28032803
{
28042804
struct cpufreq_policy *policy;
28052805
unsigned long flags;
2806-
int ret = 0;
2806+
int ret = -EOPNOTSUPP;
28072807

28082808
/*
28092809
* Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
@@ -2823,6 +2823,10 @@ static int cpufreq_boost_trigger_state(int state)
28232823
if (ret)
28242824
goto err_reset_state;
28252825
}
2826+
2827+
if (ret)
2828+
goto err_reset_state;
2829+
28262830
cpus_read_unlock();
28272831

28282832
return 0;

0 commit comments

Comments
 (0)