mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 14:40:20 -04:00
drm/amd/amdkfd: Drop unnecessary NULL check after container_of
The first parameter passed to container_of() is the pointer to the work structure passed to the worker and never NULL. The NULL check on the result of container_of() is therefore unnecessary and misleading. Remove it. This change was made automatically with the following Coccinelle script. @@ type t; identifier v; statement s; @@ <+... ( t v = container_of(...); | v = container_of(...); ) ... when != v - if (\( !v \| v == NULL \) ) s ...+> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
f43ae2d180
commit
6a593769c7
@@ -110,8 +110,6 @@ static void kfd_sdma_activity_worker(struct work_struct *work)
|
||||
|
||||
workarea = container_of(work, struct kfd_sdma_activity_handler_workarea,
|
||||
sdma_activity_work);
|
||||
if (!workarea)
|
||||
return;
|
||||
|
||||
pdd = workarea->pdd;
|
||||
if (!pdd)
|
||||
|
||||
Reference in New Issue
Block a user