drm/amdgpu/userq: remove unnecessary NULL check
authorDan Carpenter <dan.carpenter@linaro.org>
Wed, 30 Apr 2025 08:05:13 +0000 (11:05 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Apr 2025 22:18:52 +0000 (18:18 -0400)
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 <christian.koenig@amd.com>
Acked-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

index afbe01149ed3fcda1194b8da04c12a0a4dee350b..33544586ffaa01ba666e0cb46a708dd1a6c7e82e 100644 (file)
@@ -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 */