mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02: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:
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user