summaryrefslogtreecommitdiff
path: root/net/ipv4/udp_offload.c
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2020-11-10 05:57:58 +0300
committerJakub Kicinski <kuba@kernel.org>2020-11-13 01:46:00 +0300
commitcef211968c2dad7d6bc9ee136c16272eb18b5632 (patch)
treeee81e495d547677fcbe87c493ef8daf0e2e95392 /net/ipv4/udp_offload.c
parent8fc72cb541e7fef8bf2b0724ee965f34d6418832 (diff)
downloadlinux-cef211968c2dad7d6bc9ee136c16272eb18b5632.tar.xz
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 <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/5faa01d5.1c69fb81.8451c.cb5b@mx.google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv4/udp_offload.c')
-rw-r--r--net/ipv4/udp_offload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index b8b1fdeb5af9..54c9533c3acc 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;