From: Alex Deucher Date: Mon, 30 Nov 2020 23:06:49 +0000 (-0500) Subject: drm/amdgpu/powerplay/tonga: return an error if copying to smc fails X-Git-Tag: v5.11-rc1~206^2^2~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=54915feea3cab80f4b3bc8947d69484e3791292b;p=thirdparty%2Flinux.git drm/amdgpu/powerplay/tonga: return an error if copying to smc fails Rather than just silently dropping it. Also fixes a set but unused variable warning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c index 4bfadb49521bc..04b561f5d932b 100644 --- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c +++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/tonga_smumgr.c @@ -2545,7 +2545,7 @@ static int tonga_thermal_setup_fan_table(struct pp_hwmgr *hwmgr) (uint32_t)sizeof(fan_table), SMC_RAM_END); - return 0; + return res; }