drm: radeon: fix sign bug
authorDan Carpenter <error27@gmail.com>
Sat, 17 Jul 2010 10:28:02 +0000 (12:28 +0200)
committerDave Airlie <airlied@redhat.com>
Mon, 2 Aug 2010 00:00:10 +0000 (10:00 +1000)
The "error" variable is unsigned so it's never less than zero.  I
changed it to check if (freq < current_freq) directly.

"best_error" is also unsigned so "best_error - 100" could be a large
number instead of a negative.  Since "error" is unsigned it is never
less than a negative and so the cases where "best_error" is less than or
equal to 100 are false.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

No differences found