[PATCH] drm/amdgpu/jpeg: remove redundant check when it returns

Christian König ckoenig.leichtzumerken at gmail.com
Fri Aug 14 07:16:51 UTC 2020


Am 13.08.20 um 21:40 schrieb Leo Liu:
> Fix warning from kernel test robot
>
> Signed-off-by: Leo Liu <leo.liu at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> index c41e5590a701..f4ba423af051 100644
> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c
> @@ -465,8 +465,6 @@ static int jpeg_v3_0_wait_for_idle(void *handle)
>   	ret = SOC15_WAIT_ON_RREG(JPEG, 0, mmUVD_JRBC_STATUS,
>   		UVD_JRBC_STATUS__RB_JOB_DONE_MASK,
>   		UVD_JRBC_STATUS__RB_JOB_DONE_MASK);
> -	if (ret)
> -		return ret;
>   
>   	return ret;

You will probably get the next warning from the test robot with that 
because it can be simplified to "return SOC15_"...

Maybe even the local variable ret can be dropped, depending on what else 
it is used for in the function.

Christian.

>   }



More information about the amd-gfx mailing list