]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ipv6: sit: remove redundant ret = 0 assignment
authorYue Haibing <yuehaibing@huawei.com>
Wed, 8 Apr 2026 03:20:51 +0000 (11:20 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Apr 2026 03:37:40 +0000 (20:37 -0700)
The variable ret is assigned a value at all places where it is used;
There is no need to assign a value when it is initially defined.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Link: https://patch.msgid.link/20260408032051.3096449-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/sit.c

index ef2e5111fb3a5bc05f645e0c986dbd5fa2f9e89b..201347b4e12742451de6d6036281d1abaff0dd84 100644 (file)
@@ -309,7 +309,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u
        struct ip_tunnel_prl kprl, *kp;
        struct ip_tunnel_prl_entry *prl;
        unsigned int cmax, c = 0, ca, len;
-       int ret = 0;
+       int ret;
 
        if (dev == dev_to_sit_net(dev)->fb_tunnel_dev)
                return -EINVAL;