[IPV6]: ip6_xmit: remove unnecessary NULL ptr check

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 <[EMAIL PROTECTED]>

---
commit 01de2f38ba7c30523c84cbc33f4170396b2daddb
tree 408a83413375e5114dee1888598a59dc692fdb51
parent 4c28d48f6c3b14f3f8aa7142a428a91d1f2561e1
author Patrick McHardy <[EMAIL PROTECTED]> Thu, 23 Mar 2006 05:54:40 +0100
committer Patrick McHardy <[EMAIL PROTECTED]> Thu, 23 Mar 2006 05:54:40 +0100

 net/ipv6/ip6_output.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4fbc40b..e460489 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -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;

Reply via email to