Skip to content

Commit

Permalink
net/ipv6: remove unused err variable on icmpv6_push_pending_frames
Browse files Browse the repository at this point in the history
int err is unused by icmpv6_push_pending_frames(), this patch returns removes the variable and returns the function with 0.

git bisect shows this variable has been around since linux has been in git in commit 1da177e.

This was found by running make coccicheck M=net/ipv6/ on linus' tree on commit 77ede3a (current HEAD as of this patch).

Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tim Hansen authored and David S. Miller committed Oct 6, 2017
1 parent 380537b commit cc71b7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
{
struct sk_buff *skb;
struct icmp6hdr *icmp6h;
int err = 0;

skb = skb_peek(&sk->sk_write_queue);
if (!skb)
Expand Down Expand Up @@ -288,7 +287,7 @@ int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
}
ip6_push_pending_frames(sk);
out:
return err;
return 0;
}

struct icmpv6_msg {
Expand Down

0 comments on commit cc71b7b

Please sign in to comment.