: Don't initialize err variable twice.
Subsystems (3)
PATCH 1/1 : Don't initialize err variable twice.
The ip6_route_net_init() performs some unneeded actions.
Signed-off-by Pavel Emelyanov <[email protected]>
---
net/ipv6/route.c +1 -1
@@ -2614,7 +2614,7 @@ struct ctl_table *ipv6_route_sysctl_init(struct net *net)static int ip6_route_net_init (struct net *net) { -int ret =0 ; +int ret; ret = -ENOMEM ; net->ipv6.ip6_dst_ops = kmemdup(&ip6_dst_ops_template,
From: Pavel Emelyanov <[email protected]>
Date: Mon, 21 Apr 2008 17:07:53 +0400
Quoted 3 lines
The
ip6_route_net_init()performs some unneeded actions.Signed-off-by Pavel Emelyanov <[email protected]>
Applied, except that I put the initialization with the variable declaration to save screen real-estate when people look at this code :-) Like so:
commit 633d424bf33dab99e77b36210fbd1b996e7823df
Author: Pavel Emelyanov <[email protected]> Date: Mon Apr 21 14:25:23 2008 -0700
[NETNS]: Don't initialize err variable twice.
The ip6_route_net_init() performs some unneeded actions.
Signed-off-by Pavel Emelyanov <[email protected]>
Signed-off-by David S. Miller <[email protected]>
net/ipv6/route.c +1 -2
@@ -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 );
In article <[email protected]> (at Mon, 21 Apr 2008 17:07:53 +0400), Pavel Emelyanov <[email protected]> says:
Quoted 3 lines
The
ip6_route_net_init()performs some unneeded actions.Signed-off-by Pavel Emelyanov <[email protected]>