Commit 77cf053b authored by Lifeng Zheng's avatar Lifeng Zheng Committed by Rafael J. Wysocki
Browse files

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: default avatarLifeng Zheng <zhenglifeng1@huawei.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJie Zhan <zhanjie9@hisilicon.com>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20251202072727.1368285-2-zhenglifeng1@huawei.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 8f0b4cce
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2803,7 +2803,7 @@ static int cpufreq_boost_trigger_state(int state)
{
	struct cpufreq_policy *policy;
	unsigned long flags;
	int ret = 0;
	int ret = -EOPNOTSUPP;

	/*
	 * Don't compare 'cpufreq_driver->boost_enabled' with 'state' here to
@@ -2823,6 +2823,10 @@ static int cpufreq_boost_trigger_state(int state)
		if (ret)
			goto err_reset_state;
	}

	if (ret)
		goto err_reset_state;

	cpus_read_unlock();

	return 0;