net: udp: remove redundant initialization in udp_dump_one
authorMenglong Dong <dong.menglong@zte.com.cn>
Fri, 6 Nov 2020 06:42:38 +0000 (01:42 -0500)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Nov 2020 00:42:49 +0000 (16:42 -0800)
The initialization for 'err' with '-EINVAL' is redundant and
can be removed, as it is updated soon and not used.

Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
Link: https://lore.kernel.org/r/1604644960-48378-2-git-send-email-dong.menglong@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp_diag.c

index 1dbece34496e5457e5d0a4758a8f5f04cf107efc..b2cee9a307d4c2a5eec7e220b3ffb827a9ce3dcf 100644 (file)
@@ -30,7 +30,7 @@ static int udp_dump_one(struct udp_table *tbl,
                        const struct inet_diag_req_v2 *req)
 {
        struct sk_buff *in_skb = cb->skb;
-       int err = -EINVAL;
+       int err;
        struct sock *sk = NULL;
        struct sk_buff *rep;
        struct net *net = sock_net(in_skb->sk);