l2tp: fix unused variable warning
authorEric Dumazet <edumazet@google.com>
Fri, 7 Mar 2014 22:57:43 +0000 (14:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Mar 2014 19:32:24 +0000 (15:32 -0400)
net/l2tp/l2tp_core.c:1111:15: warning: unused variable
'sk' [-Wunused-variable]

Fixes: 31c70d5956fc ("l2tp: keep original skb ownership")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c

index 9958c31c2c54597c8e7986528f4b0ffc747df9df..dcab9ddc4388000fa808e8ff8e00b4f6f228e3de 100644 (file)
@@ -1108,7 +1108,6 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb,
                          struct flowi *fl, size_t data_len)
 {
        struct l2tp_tunnel *tunnel = session->tunnel;
-       struct sock *sk = tunnel->sock;
        unsigned int len = skb->len;
        int error;
 
@@ -1132,7 +1131,7 @@ static int l2tp_xmit_core(struct l2tp_session *session, struct sk_buff *skb,
        /* Queue the packet to IP for output */
        skb->local_df = 1;
 #if IS_ENABLED(CONFIG_IPV6)
-       if (sk->sk_family == PF_INET6 && !tunnel->v4mapped)
+       if (tunnel->sock->sk_family == PF_INET6 && !tunnel->v4mapped)
                error = inet6_csk_xmit(skb, NULL);
        else
 #endif