]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amdgpu: Drop redundant queue NULL check in hang detect worker
authorSrinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Sun, 15 Mar 2026 07:12:42 +0000 (12:42 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 21:46:44 +0000 (17:46 -0400)
commit9a62a097a7f8d223d722b9e9b557a792d30600ca
tree64041bd24403e2bfd32461a96ff890f8c1190588
parenta53676efc44a6265dee4cef44ef8b0c9079886ef
drm/amdgpu: Drop redundant queue NULL check in hang detect worker

amdgpu_userq_hang_detect_work() retrieves the queue pointer using
container_of() from the embedded work item.

Since the work structure is part of struct amdgpu_usermode_queue,
the returned queue pointer cannot be NULL in normal execution.

Remove the redundant !queue check and keep the validation for
queue->userq_mgr.

Fixes the below:
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c:159 amdgpu_userq_hang_detect_work() warn: can 'queue' even be NULL?

Fixes: 290f46cf5726 ("drm/amdgpu: Implement user queue reset functionality")
Cc: Jesse Zhang <Jesse.Zhang@amd.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Acked-by: Jesse Zhang <jesse.zhang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c