From 788606cb8864765bb16be23d368725df84d0e3cc Mon Sep 17 00:00:00 2001 From: Andrey Utkin Date: Sat, 19 Jul 2014 22:14:04 +0300 Subject: PM / tools: cpupower: drop negativity check on unsigned value Link: https://bugzilla.kernel.org/show_bug.cgi?id=80621 Reported-by: David Binderman Signed-off-by: Andrey Utkin Signed-off-by: Rafael J. Wysocki diff --git a/tools/power/cpupower/utils/helpers/sysfs.c b/tools/power/cpupower/utils/helpers/sysfs.c index 851c7a1..09afe5d 100644 --- a/tools/power/cpupower/utils/helpers/sysfs.c +++ b/tools/power/cpupower/utils/helpers/sysfs.c @@ -81,7 +81,7 @@ int sysfs_is_cpu_online(unsigned int cpu) close(fd); value = strtoull(linebuf, &endp, 0); - if (value > 1 || value < 0) + if (value > 1) return -EINVAL; return value; -- cgit v0.10.2