summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
diff options
context:
space:
mode:
authorChen Wandun <chenwandun@huawei.com>2019-11-18 16:03:34 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-11-19 10:12:54 -0500
commit4a11327822006f56b673f4fb06f1718bcb9a700a (patch)
tree69ef2469e438d918529d405945101c6725117439 /drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
parent16641949257a5644a0f9f2d2f454663c9a37841e (diff)
drm/amd/powerplay: return errno code to caller when error occur
return errno code to caller when error occur, and meanwhile remove gcc '-Wunused-but-set-variable' warning. drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In function vegam_populate_smc_boot_level: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1364:6: warning: variable result set but not used [-Wunused-but-set-variable] Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Chen Wandun <chenwandun@huawei.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
index 2068eb00d2f8..50896e9b2579 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
@@ -1371,11 +1371,16 @@ static int vegam_populate_smc_boot_level(struct pp_hwmgr *hwmgr,
result = phm_find_boot_level(&(data->dpm_table.sclk_table),
data->vbios_boot_state.sclk_bootup_value,
(uint32_t *)&(table->GraphicsBootLevel));
+ if (result)
+ return result;
result = phm_find_boot_level(&(data->dpm_table.mclk_table),
data->vbios_boot_state.mclk_bootup_value,
(uint32_t *)&(table->MemoryBootLevel));
+ if (result)
+ return result;
+
table->BootVddc = data->vbios_boot_state.vddc_bootup_value *
VOLTAGE_SCALE;
table->BootVddci = data->vbios_boot_state.vddci_bootup_value *