Re: [PATCH] drm/amd/pm: remove useless if
From: Alex Deucher
Date: Fri Jan 21 2022 - 15:50:13 EST
Applied. Thanks!
Alex
On Fri, Jan 21, 2022 at 6:48 AM Jiapeng Chong
<jiapeng.chong@xxxxxxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@xxxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 5 +----
> 1 file changed, 1 insertion(+), 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,
> --
> 2.20.1.7.g153144c
>