summaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-07-01 16:04:33 +0100
committerDavid S. Miller <davem@davemloft.net>2020-07-01 12:44:52 -0700
commit2a6d6c31f136c136c05455788579586874a0525c (patch)
treec3f22439945d36f55e71f042148eaf2045f6b466 /net/packet
parent2b04a66156159592156a97553057e8c36de2ee70 (diff)
downloadlinux-2a6d6c31f136c136c05455788579586874a0525c.tar.bz2
net/packet: remove redundant initialization of variable err
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>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 29bd405adbbd..7b436ebde61d 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -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;