diff options
author | Colin Ian King <colin.king@canonical.com> | 2017-11-09 11:35:00 +0000 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-09 18:12:19 -0500 |
commit | 1ec9b0afbdc32800ea1ff10ce61c52f5ceba4431 (patch) | |
tree | 6d0c5e0b684c1587d9d9fc3d8556b7bef70f3f64 /drivers/gpu/drm/amd/powerplay | |
parent | cdadab89f8cc37dd6101e2bbab50037d72e0e1d0 (diff) | |
download | linux-1ec9b0afbdc32800ea1ff10ce61c52f5ceba4431.tar.bz2 |
drm/amd/powerplay: fix copy-n-paste error on vddci_buf index
The index to vddci_buf is using profile->ucElbVDDC_Num rather
than profile->ucElbVDDCI_Num; this looks like a copy-n-paste
error from previous code for the vddc_buf array and I'm pretty
sure this is incorrect. Fix this by using the correct variable.
Detected by CoverityScan, CID#1457172 ("Copy-paste error")
Fixes: 970d9804b00d ("drm/amd/powerplay: Add support functions for CI to ppatomctrl.c")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c index a129bc5b1844..c6febbf0bf69 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c @@ -1486,7 +1486,7 @@ int atomctrl_get_leakage_vddc_base_on_leakage(struct pp_hwmgr *hwmgr, if (vddci_id_buf[i] == virtual_voltage_id) { for (j = 0; j < profile->ucLeakageBinNum; j++) { if (efuse_voltage_id <= leakage_bin[j]) { - *vddci = vddci_buf[j * profile->ucElbVDDC_Num + i]; + *vddci = vddci_buf[j * profile->ucElbVDDCI_Num + i]; break; } } |