summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-21 00:24:58 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-21 00:24:58 +0300
commit350d32395bee1a21deec504a253b336e20d9f35a (patch)
treec247d88bf2e7d0f389751e098d9b364fd76f4a2f /include/linux
parent1001354ca34179f3db924eb66672442a173147dc (diff)
parentc6fe46a79ecd79606bb96fada4515f6b23f87b62 (diff)
downloadlinux-350d32395bee1a21deec504a253b336e20d9f35a.tar.xz
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq: fix overflow in cpufreq_table_find_index_dl()
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cpufreq.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 5fa55fc56e18..32dc0cbd51ca 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -677,10 +677,10 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy,
if (best == table - 1)
return pos - table;
- return best - pos;
+ return best - table;
}
- return best - pos;
+ return best - table;
}
/* Works only on sorted freq-tables */