Explorar o código

[NETNS]: Don't initialize err variable twice.

The ip6_route_net_init() performs some unneeded actions.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pavel Emelyanov %!s(int64=17) %!d(string=hai) anos
pai
achega
633d424bf3
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      net/ipv6/route.c

+ 1 - 2
net/ipv6/route.c

@@ -2614,9 +2614,8 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net)
 
 static int ip6_route_net_init(struct net *net)
 {
-	int ret = 0;
+	int ret = -ENOMEM;
 
-	ret = -ENOMEM;
 	net->ipv6.ip6_dst_ops = kmemdup(&ip6_dst_ops_template,
 					sizeof(*net->ipv6.ip6_dst_ops),
 					GFP_KERNEL);