drm/amd/pm: remove useless if
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Fri, 21 Jan 2022 11:48:00 +0000 (19:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jan 2022 23:00:33 +0000 (18:00 -0500)
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>
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c

index 23ff0d812e4ba809f33a1e75b2444337af41d3da..7427c50409d4f6fc3fb8bc0877054eb88ec90ecf 100644 (file)
@@ -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,