From: Andrey Utkin Date: Sat, 19 Jul 2014 19:14:04 +0000 (+0300) Subject: PM / tools: cpupower: drop negativity check on unsigned value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=788606cb8864765bb16be23d368725df84d0e3cc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 851c7a16ca49..09afe5d87f2b 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;