diff options
author | Dan Carpenter <error27@gmail.com> | 2010-04-30 19:42:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-30 19:42:08 -0400 |
commit | 83d7eb2979cd3390c375470225dd2d8f2009bc70 (patch) | |
tree | 9f387e28439c113772af962c1b6da9a1f7731f32 /net/ipv6/ip6_output.c | |
parent | 4b021628beb26238087812829cc080da47e4b236 (diff) |
ipv6: cleanup: remove unneeded null check
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>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7db09c3f5289..e7a5f17d5e95 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -218,8 +218,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, | |||
218 | } | 218 | } |
219 | kfree_skb(skb); | 219 | kfree_skb(skb); |
220 | skb = skb2; | 220 | skb = skb2; |
221 | if (sk) | 221 | skb_set_owner_w(skb, sk); |
222 | skb_set_owner_w(skb, sk); | ||
223 | } | 222 | } |
224 | if (opt->opt_flen) | 223 | if (opt->opt_flen) |
225 | ipv6_push_frag_opts(skb, opt, &proto); | 224 | ipv6_push_frag_opts(skb, opt, &proto); |