summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2020-11-06 01:42:40 -0500
committerJakub Kicinski <kuba@kernel.org>2020-11-09 16:42:34 -0800
commitcffb8f6177bbfc235e7054a4bb321b126b64205c (patch)
treecc07ca5bc603c358567095f912194a3019d1c178 /net
parent0169b8205431589b945c29a576c65f2037a5bc26 (diff)
net: udp: remove redundant initialization in udp_send_skb
The initialization for 'err' with 0 is redundant and can be removed, as it is updated by ip_send_skb and not used before that. Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/1604644960-48378-4-git-send-email-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 1e2e73accd11..0d5cd6905749 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -874,7 +874,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4,
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
- int err = 0;
+ int err;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;