summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>2022-01-21 19:48:00 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-01-25 18:00:33 -0500
commit1418b9c38270f4c7843627cb0e9047b19eb3365a (patch)
treec3ed892d46aae07124c56dbd2613807de4f56001 /drivers/gpu/drm
parentdfced44f122c500004a48ecc8db516bb6a295a1b (diff)
drm/amd/pm: remove useless if
Clean the following coccicheck warning: ./drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c:7035:2-4: WARNING: possible condition with no effect (if == else). Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
index 23ff0d812e4b..7427c50409d4 100644
--- a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
+++ b/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c
@@ -7032,10 +7032,7 @@ static int si_power_control_set_level(struct amdgpu_device *adev)
ret = si_resume_smc(adev);
if (ret)
return ret;
- ret = si_set_sw_state(adev);
- if (ret)
- return ret;
- return 0;
+ return si_set_sw_state(adev);
}
static void si_set_vce_clock(struct amdgpu_device *adev,