summaryrefslogtreecommitdiff
path: root/net/core/bpf_sk_storage.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2021-05-13 19:58:40 +0300
committerDavid S. Miller <davem@davemloft.net>2021-05-14 01:55:50 +0300
commit0f3ee280331e28b81560715356d47351a6016bce (patch)
tree472c464fa35ad10e8ac8471269bcf0cecee22980 /net/core/bpf_sk_storage.c
parent5efe2575316f97aa6d004fc0534e48ea85acdff3 (diff)
downloadlinux-0f3ee280331e28b81560715356d47351a6016bce.tar.xz
net: caif: Drop unnecessary NULL check after container_of
The first parameter passed to chnl_recv_cb() can never be NULL since all callers dereferenced it. Consequently, container_of() on it is also never NULL, even though the reference into the structure points to the first element of the structure. The NULL check is therefore unnecessary. 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 test 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 'net/core/bpf_sk_storage.c')
0 files changed, 0 insertions, 0 deletions