[PATCH 2/3] drm/xe: Remove unrequired NULL checks in xe_sync_entry_cleanup
Nirmoy Das
nirmoy.das at linux.intel.com
Tue Aug 27 08:28:42 UTC 2024
On 8/20/2024 11:02 AM, Himal Prasad Ghimiray wrote:
> dma_fence_put() and 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: Nirmoy Das <nirmoy.das at intel.com>
> ---
> drivers/gpu/drm/xe/xe_sync.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index a0675f57a398..436faff09bac 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -249,10 +249,8 @@ void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
> {
> if (sync->syncobj)
> drm_syncobj_put(sync->syncobj);
> - if (sync->fence)
> - dma_fence_put(sync->fence);
> - if (sync->chain_fence)
> - dma_fence_chain_free(sync->chain_fence);
> + dma_fence_put(sync->fence);
> + dma_fence_chain_free(sync->chain_fence);
> if (sync->ufence)
> user_fence_put(sync->ufence);
> }
More information about the Intel-xe
mailing list