From: Menglong Dong Date: Tue, 10 Nov 2020 02:57:58 +0000 (-0500) Subject: net: udp: remove redundant initialization in udp_gro_complete X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cef211968c2dad7d6bc9ee136c16272eb18b5632;p=linux.git net: udp: remove redundant initialization in udp_gro_complete The initialization for 'err' with '-ENOSYS' is redundant and can be removed, as it is updated soon and not used. Changes since v1: - Move the err declaration below struct sock *sk Signed-off-by: Menglong Dong Link: https://lore.kernel.org/r/5faa01d5.1c69fb81.8451c.cb5b@mx.google.com Signed-off-by: Jakub Kicinski --- diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index b8b1fdeb5af97..54c9533c3acc1 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -554,8 +554,8 @@ int udp_gro_complete(struct sk_buff *skb, int nhoff, { __be16 newlen = htons(skb->len - nhoff); struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); - int err = -ENOSYS; struct sock *sk; + int err; uh->len = newlen;