From: Dan Carpenter Date: Wed, 30 Apr 2025 08:05:13 +0000 (+0300) Subject: drm/amdgpu/userq: remove unnecessary NULL check X-Git-Tag: v6.16-rc1~144^2~10^2~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97c39b4da606f6e6ec62689d1963ee6a5ad7f8ac;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/userq: remove unnecessary NULL check The "ticket" pointer points to in the middle of the &exec struct so it can't be NULL. Remove the check. Reviewed-by: Christian König Acked-by: Shashank Sharma Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index afbe01149ed3f..33544586ffaa0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -623,7 +623,7 @@ amdgpu_userq_validate_bos(struct amdgpu_userq_mgr *uq_mgr) clear = false; unlock = true; /* The caller is already holding the reservation lock */ - } else if (ticket && dma_resv_locking_ctx(resv) == ticket) { + } else if (dma_resv_locking_ctx(resv) == ticket) { clear = false; unlock = false; /* Somebody else is using the BO right now */