From: Liu Shixin Date: Mon, 21 Sep 2020 08:24:30 +0000 (+0800) Subject: drm/amd/pm: simplify the return expression of smu_hw_fini X-Git-Tag: v5.10.7~1332^2~8^2~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a78f15fb6c906c3f8c9330ed4cc0af7a24016c4;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/pm: simplify the return expression of smu_hw_fini Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c index 5c4b74f..3612841 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c @@ -1214,7 +1214,6 @@ static int smu_hw_fini(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct smu_context *smu = &adev->smu; - int ret = 0; if (amdgpu_sriov_vf(adev)&& !amdgpu_sriov_is_pp_one_vf(adev)) return 0; @@ -1230,11 +1229,7 @@ static int smu_hw_fini(void *handle) adev->pm.dpm_enabled = false; - ret = smu_smc_hw_cleanup(smu); - if (ret) - return ret; - - return 0; + return smu_smc_hw_cleanup(smu); } int smu_reset(struct smu_context *smu)