aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Shixin <[email protected]>2020-09-21 16:24:30 +0800
committerAlex Deucher <[email protected]>2020-09-22 17:37:37 -0400
commit4a78f15fb6c906c3f8c9330ed4cc0af7a24016c4 (patch)
treec0a366471dae675eac40176920b2b15bf392ed94
parentda51e50d454dbfd92f1426b5674fef5f3e229ab1 (diff)
drm/amd/pm: simplify the return expression of smu_hw_fini
Simplify the return expression. Signed-off-by: Liu Shixin <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index 5c4b74f964fc..3612841d40dc 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)