summaryrefslogtreecommitdiff
path: root/drivers/atm
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2021-05-11 13:54:49 -0700
committerDavid S. Miller <davem@davemloft.net>2021-05-11 16:24:02 -0700
commitfaa5f5da809b690542e1108ba66886574ac57d2c (patch)
treeba213b8c1c78a5157982c7e9ad4526e2c7fe5565 /drivers/atm
parentcac6fb015f719104e60b1c68c15ca5b734f57b9c (diff)
net/sched: taprio: Drop unnecessary NULL check after container_of
The rcu_head pointer passed to taprio_free_sched_cb is never NULL. That means that the result of container_of() operations on it is also never NULL, even though rcu_head is the first element of the structure embedding it. On top of that, it is misleading to perform a NULL check on the result of container_of() because the position of the contained element could change, which would make the check invalid. Remove the unnecessary NULL check. 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 ...+> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
0 files changed, 0 insertions, 0 deletions