Skip to content

Commit

Permalink
[CPUFREQ] Remove pointless check in conservative governor.
Browse files Browse the repository at this point in the history
< 0 checks on unsigned variables are pointless.

Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Dave Jones committed Apr 2, 2006
1 parent 87c3227 commit b82fbe6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/cpufreq/cpufreq_conservative.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,7 @@ static ssize_t store_up_threshold(struct cpufreq_policy *unused,
ret = sscanf (buf, "%u", &input);

mutex_lock(&dbs_mutex);
if (ret != 1 || input > 100 || input < 0 ||
input <= dbs_tuners_ins.down_threshold) {
if (ret != 1 || input > 100 || input <= dbs_tuners_ins.down_threshold) {
mutex_unlock(&dbs_mutex);
return -EINVAL;
}
Expand All @@ -196,8 +195,7 @@ static ssize_t store_down_threshold(struct cpufreq_policy *unused,
ret = sscanf (buf, "%u", &input);

mutex_lock(&dbs_mutex);
if (ret != 1 || input > 100 || input < 0 ||
input >= dbs_tuners_ins.up_threshold) {
if (ret != 1 || input > 100 || input >= dbs_tuners_ins.up_threshold) {
mutex_unlock(&dbs_mutex);
return -EINVAL;
}
Expand Down

0 comments on commit b82fbe6

Please sign in to comment.