Skip to content

Commit

Permalink
[NETNS]: Don't initialize err variable twice.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 21, 2008
1 parent 2aed282 commit 633d424
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 633d424

Please sign in to comment.