PM / tools: cpupower: drop negativity check on unsigned value
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>
Sat, 19 Jul 2014 19:14:04 +0000 (22:14 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 19 Jul 2014 19:41:17 +0000 (21:41 +0200)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=80621
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/cpupower/utils/helpers/sysfs.c

index 851c7a16ca49633f0db3fd155b15466dfc4ab4fa..09afe5d87f2bbe34387e1257cfcc67bd5d16d4dc 100644 (file)
@@ -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;