Skip to content
Commit 09c65383 authored by Guenter Roeck's avatar Guenter Roeck Committed by Martin K. Petersen
Browse files

scsi: qedf: Drop unnecessary NULL checks after container_of()



The result of container_of() operations is never NULL unless the embedded
element is the first element of the structure, which is not the case here.
The NULL checks are therefore unnecessary and misleading. Remove them.

The changes in this patch were made automatically using the following
Coccinelle script.

@@
type t;
identifier v;
statement s;
@@

<+...
(
  t v = container_of(...);
|
  v = container_of(...);
)
  ...
  when != v
- if (\( !v \| v == NULL \) ) s
...+>

Link: https://lore.kernel.org/r/20210510041211.2051325-1-linux@roeck-us.net
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 998da772
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment