Skip to content

Commit

Permalink
net/packet: remove redundant initialization of variable err
Browse files Browse the repository at this point in the history
The variable err is being initialized with a value that is never read
and it is being updated later with a new value.  The initialization is
redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed Jul 1, 2020
1 parent 2b04a66 commit 2a6d6c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/packet/af_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -4293,7 +4293,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
struct packet_ring_buffer *rb;
struct sk_buff_head *rb_queue;
__be16 num;
int err = -EINVAL;
int err;
/* Added to avoid minimal code churn */
struct tpacket_req *req = &req_u->req;

Expand Down

0 comments on commit 2a6d6c3

Please sign in to comment.