net: udp: remove redundant initialization in udp_gro_complete
Subsystems (2)
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
Signed-off-by Menglong Dong <[email protected]>
--- net/ipv4/udp_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/udp_offload.c +1 -1
@@ -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
Quoted 9 lines · On Mon, 9 Nov 2020 21:57:58 -0500 [email protected] wrote:
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 *skSigned-off-by Menglong Dong <[email protected]>
Applied, thanks!