aboutsummaryrefslogtreecommitdiffstats
path: root/xen/drivers/cpufreq
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
committerKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
commit5100a5ede1a200a2831f0b357fb474b853f8c83f (patch)
tree179b84e20f46a09cf19007e46e9cd850e5720618 /xen/drivers/cpufreq
parent9bbfbb147798c91c4f4c6f0b947ca62a7ae8b89a (diff)
downloadxen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.gz
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.bz2
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.zip
Xen: fix various checks of unsigned integers < 0
Some of these could be benignly discarded by the compiler but some are actual bugs. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/drivers/cpufreq')
-rw-r--r--xen/drivers/cpufreq/cpufreq.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c
index 9b2954fc09..4ecb7dedb3 100644
--- a/xen/drivers/cpufreq/cpufreq.c
+++ b/xen/drivers/cpufreq/cpufreq.c
@@ -116,8 +116,7 @@ int cpufreq_limit_change(unsigned int cpu)
!processor_pminfo[cpu])
return -ENODEV;
- if ((perf->platform_limit < 0) ||
- (perf->platform_limit >= perf->state_count))
+ if (perf->platform_limit >= perf->state_count)
return -EINVAL;
memcpy(&policy, data, sizeof(struct cpufreq_policy));