Commit 6a593769 authored by Guenter Roeck's avatar Guenter Roeck Committed by Alex Deucher
Browse files

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: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent f43ae2d1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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)