diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2020-07-30 06:29:40 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2020-07-30 09:10:16 +0300 |
commit | 292072c38768bb2321cf643b27cdf8fd8282d028 (patch) | |
tree | 41b1cc43d5fe5eacc2c3ef5706de0af6256847b5 /drivers/cpufreq/cpufreq.c | |
parent | df320f89359c0cc22ff552da3ffd07171f7754a6 (diff) | |
download | linux-292072c38768bb2321cf643b27cdf8fd8282d028.tar.xz |
cpufreq: cached_resolved_idx can not be negative
It is not possible for cached_resolved_idx to be invalid here as the
cpufreq core always sets index to a positive value.
Change its type to unsigned int and fix qcom usage a bit.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 0128de3603df..053d72e52a31 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -538,7 +538,7 @@ unsigned int cpufreq_driver_resolve_freq(struct cpufreq_policy *policy, policy->cached_target_freq = target_freq; if (cpufreq_driver->target_index) { - int idx; + unsigned int idx; idx = cpufreq_frequency_table_target(policy, target_freq, CPUFREQ_RELATION_L); |