diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4472bb1ec83c..8de9c94c097f 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -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;