Skip to content

Commit

Permalink
ipv6: cleanup: remove unneeded null check
Browse files Browse the repository at this point in the history
We dereference "sk" unconditionally elsewhere in the function.  

This was left over from:  b30bd28 "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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 30, 2010
1 parent 4b02162 commit 83d7eb2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/ip6_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 83d7eb2

Please sign in to comment.