diff options
| author | Olav Haugan <ohaugan@codeaurora.org> | 2016-10-19 10:35:52 -0700 |
|---|---|---|
| committer | Olav Haugan <ohaugan@codeaurora.org> | 2016-10-19 10:35:52 -0700 |
| commit | 04daea81fc151c75f2e6811be132b07322d4c536 (patch) | |
| tree | 24ced4e4b332f6ced97ac6d2e0a2dc42506be1c4 /kernel | |
| parent | 827d0483007ace97844284be67624f1e06ff54e9 (diff) | |
sched/hmp: Fix range checking for target load
The range check for target load is incorrect. Fix this. This is only a
sanity check to catch badly specified target loads.
Change-Id: Ia90d020f5e0bdf37c600661a1c246dab5b637b3b
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/hmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c index 3d5de8ba70a2..53f361ed0167 100644 --- a/kernel/sched/hmp.c +++ b/kernel/sched/hmp.c @@ -201,7 +201,7 @@ int sched_update_freq_max_load(const cpumask_t *cpumask) entry = &max_load->freqs[i]; freq = costs[i].freq; hpct = get_freq_max_load(cpu, freq); - if (hpct <= 0 && hpct > 100) + if (hpct <= 0 || hpct > 100) hpct = 100; hfreq = div64_u64((u64)freq * hpct, 100); entry->hdemand = |
