diff options
author | Guillaume Nault <g.nault@alphalink.fr> | 2017-01-06 20:03:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-06 22:18:56 -0500 |
commit | 986f7cbc510e29c33b7c8c1701a902a752159425 (patch) | |
tree | af9547f6cc0ff0581cec9f35e4ea8ec176640f23 /net/l2tp/l2tp_ip6.c | |
parent | bb39b0bdc8c62e97ceedb9a5dadea0f098431d8b (diff) | |
download | linux-986f7cbc510e29c33b7c8c1701a902a752159425.tar.gz linux-986f7cbc510e29c33b7c8c1701a902a752159425.tar.bz2 linux-986f7cbc510e29c33b7c8c1701a902a752159425.zip |
l2tp: remove useless NULL check in __l2tp_ip*_bind_lookup()
If "l2tp" was NULL, that'd mean "sk" is NULL too. This can't happen
since "sk" is returned by sk_for_each_bound().
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp/l2tp_ip6.c')
-rw-r--r-- | net/l2tp/l2tp_ip6.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c index 2f6be6ddc8cb..7165b06d7b25 100644 --- a/net/l2tp/l2tp_ip6.c +++ b/net/l2tp/l2tp_ip6.c @@ -69,9 +69,6 @@ static struct sock *__l2tp_ip6_bind_lookup(const struct net *net, const struct in6_addr *sk_raddr = &sk->sk_v6_daddr; const struct l2tp_ip6_sock *l2tp = l2tp_ip6_sk(sk); - if (l2tp == NULL) - continue; - if ((l2tp->conn_id == tunnel_id) && net_eq(sock_net(sk), net) && (!sk_laddr || ipv6_addr_any(sk_laddr) || ipv6_addr_equal(sk_laddr, laddr)) && |