From: Colin Ian King Date: Wed, 1 Jul 2020 15:04:33 +0000 (+0100) Subject: net/packet: remove redundant initialization of variable err X-Git-Tag: v5.15~3197^2~370 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a6d6c31f136c136c05455788579586874a0525c;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: David S. Miller --- diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 29bd405..7b436eb 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;