summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-20 23:24:58 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-20 23:24:58 +0200
commit350d32395bee1a21deec504a253b336e20d9f35a (patch)
treec247d88bf2e7d0f389751e098d9b364fd76f4a2f /include
parentLinux 4.9-rc1 (diff)
parentcpufreq: fix overflow in cpufreq_table_find_index_dl() (diff)
downloadlinux-350d32395bee1a21deec504a253b336e20d9f35a.tar.xz
linux-350d32395bee1a21deec504a253b336e20d9f35a.zip
Merge branch 'pm-cpufreq'
* pm-cpufreq: cpufreq: fix overflow in cpufreq_table_find_index_dl()
Diffstat (limited to 'include')
-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 */