Skip to contentSkip to conversation

net: udp: remove redundant initialization in udp_gro_complete

PATCH Applied [email protected] 2 participants 2 messages Nov 10, 2020 – Nov 12, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: udp: remove redundant initialization in udp_gro_complete

From: Menglong Dong <[email protected]>

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

---
 net/ipv4/udp_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/udp_offload.c +1 -1
index b8b1fde..54c9533 100644
@@ -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;
 
Signature · 1 line
2.7.4