[PATCH net-next] ipv6: sit: remove redundant ret = 0 assignment

Yue Haibing
2026-04-03T08:20:53Z

The variable ret is initialized to 0 when it is defined
and is not modified before copy_to_user().

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
net/ipv6/sit.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index ef2e5111fb3a..09c0a01d44f4 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -359,7 +359,6 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u
rcu_read_unlock();

len = sizeof(*kp) * c;
- ret = 0;
if ((len && copy_to_user(a + 1, kp, len)) || put_user(len, &a->datalen))
ret = -EFAULT;

--
2.34.1