diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-09-04 09:31:36 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-11 15:44:27 (GMT) |
commit | 8c5c6fad61f9540a977e5731a8ae3bd8ba9083cb (patch) | |
tree | badcd9d2600c330c1ca93238511175106c116c53 /drivers/target | |
parent | 41cd0b3b78d83ae87ee71cca2de5498f93816763 (diff) | |
download | linux-8c5c6fad61f9540a977e5731a8ae3bd8ba9083cb.tar.xz |
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/target')
0 files changed, 0 insertions, 0 deletions