diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-09-04 05:31:36 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 11:44:27 -0400 |
commit | 8c5c6fad61f9540a977e5731a8ae3bd8ba9083cb (patch) | |
tree | badcd9d2600c330c1ca93238511175106c116c53 /drivers/gpu/drm/savage | |
parent | 41cd0b3b78d83ae87ee71cca2de5498f93816763 (diff) |
drm/radeon: signedness bug in kv_dpm.c
The problem here is that "unsigned i" is always greater than or equal to
zero. These loops mostly have a second check for "(i == 0)" so only the
last two are actually buggy. The rest is just cleanup.
Bug 1: kv_force_dpm_highest() doesn't have an "(i == 0)" check so it's
a potential forever loop.
Bug 2: In kv_get_sleep_divider_id_from_clock() there is a typo and the
test is reversed "<=" vs ">" so we never enter the loop. That means
normally we return KV_MAX_DEEPSLEEP_DIVIDER_ID (5). The return value
from here is saved in ->DeepSleepDivId and I wasn't able to determine
how that is used. This is a static checker fix and I have not tested
it.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/savage')
0 files changed, 0 insertions, 0 deletions