Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 167ffc44 authored by Dan Carpenter's avatar Dan Carpenter Committed by Dave Airlie
Browse files

drm: radeon: fix sign bug



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: default avatarDan Carpenter <error27@gmail.com>
Reviewed-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4c712e6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment