From 986f7cbc510e29c33b7c8c1701a902a752159425 Mon Sep 17 00:00:00 2001 From: Guillaume Nault Date: Fri, 6 Jan 2017 20:03:56 +0100 Subject: 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 Signed-off-by: David S. Miller --- net/l2tp/l2tp_ip.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'net/l2tp/l2tp_ip.c') diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index e5686bf898f7..499d3cdbfbc8 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c @@ -56,9 +56,6 @@ static struct sock *__l2tp_ip_bind_lookup(const struct net *net, __be32 laddr, const struct l2tp_ip_sock *l2tp = l2tp_ip_sk(sk); const struct inet_sock *inet = inet_sk(sk); - if (l2tp == NULL) - continue; - if ((l2tp->conn_id == tunnel_id) && net_eq(sock_net(sk), net) && !(inet->inet_rcv_saddr && inet->inet_rcv_saddr != laddr) && -- cgit v1.2.3