[PATCH 3/3] drm/xe: Remove unrequired NULL check in xe_sched_job_free_fences

Matthew Brost matthew.brost at intel.com
Tue Aug 20 16:05:57 UTC 2024


On Tue, Aug 20, 2024 at 02:32:30PM +0530, Himal Prasad Ghimiray wrote:
> dma_fence_chain_free() can handle NULL input, there is no need for NULL
> check by caller.
> 
> Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>

Reviewed-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_sched_job.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_sched_job.c b/drivers/gpu/drm/xe/xe_sched_job.c
> index 44d534e362cd..4ed0c366ccff 100644
> --- a/drivers/gpu/drm/xe/xe_sched_job.c
> +++ b/drivers/gpu/drm/xe/xe_sched_job.c
> @@ -89,8 +89,7 @@ static void xe_sched_job_free_fences(struct xe_sched_job *job)
>  
>  		if (ptrs->lrc_fence)
>  			xe_lrc_free_seqno_fence(ptrs->lrc_fence);
> -		if (ptrs->chain_fence)
> -			dma_fence_chain_free(ptrs->chain_fence);
> +		dma_fence_chain_free(ptrs->chain_fence);
>  	}
>  }
>  
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list