]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV6]: ip6_xmit: remove unnecessary NULL ptr check
authorPatrick McHardy <kaber@trash.net>
Thu, 23 Mar 2006 09:17:25 +0000 (01:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Mar 2006 09:17:25 +0000 (01:17 -0800)
The sk argument to ip6_xmit is never NULL nowadays since the skb->priority
assigment expects a valid socket.

Coverity #354

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c

index 4fbc40b13f19466f53e5d0ee0755faa8fd2466ed..e46048974f37d217e4182f6ca20b252b0c137c53 100644 (file)
@@ -161,7 +161,7 @@ int ip6_output(struct sk_buff *skb)
 int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
             struct ipv6_txoptions *opt, int ipfragok)
 {
-       struct ipv6_pinfo *np = sk ? inet6_sk(sk) : NULL;
+       struct ipv6_pinfo *np = inet6_sk(sk);
        struct in6_addr *first_hop = &fl->fl6_dst;
        struct dst_entry *dst = skb->dst;
        struct ipv6hdr *hdr;