ipv6: cleanup: remove unneeded null check
authorDan Carpenter <error27@gmail.com>
Fri, 30 Apr 2010 23:42:08 +0000 (16:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 30 Apr 2010 23:42:08 +0000 (16:42 -0700)
We dereference "sk" unconditionally elsewhere in the function.

This was left over from:  b30bd282 "ip6_xmit: remove unnecessary NULL
ptr check".  According to that commit message, "the sk argument to
ip6_xmit is never NULL nowadays since the skb->priority assigment
expects a valid socket."

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c

index 7db09c3f5289c63fb9be97a09426404e590488f8..e7a5f17d5e95801937e7cab02d08e0a982525172 100644 (file)
@@ -218,8 +218,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
                        }
                        kfree_skb(skb);
                        skb = skb2;
-                       if (sk)
-                               skb_set_owner_w(skb, sk);
+                       skb_set_owner_w(skb, sk);
                }
                if (opt->opt_flen)
                        ipv6_push_frag_opts(skb, opt, &proto);