drm/amdgpu/powerplay/iceland: return an error if copying to smc fails
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 30 Nov 2020 23:36:41 +0000 (18:36 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Dec 2020 22:37:16 +0000 (17:37 -0500)
Rather than just silently dropping it.  Also fixes a set but
unused variable warning.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_smumgr.c

index 6a0f581..03df35d 100644 (file)
@@ -2156,7 +2156,7 @@ static int iceland_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
 
        res = smu7_copy_bytes_to_smc(hwmgr, smu7_data->fan_table_start, (uint8_t *)&fan_table, (uint32_t)sizeof(fan_table), SMC_RAM_END);
 
-       return 0;
+       return res;
 }