Skip to content

Commit

Permalink
PM / tools: cpupower: drop negativity check on unsigned value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrey Utkin authored and Rafael J. Wysocki committed Jul 19, 2014
1 parent 1795cd9 commit 788606c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/power/cpupower/utils/helpers/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 788606c

Please sign in to comment.