Skip to contentSkip to conversation

net/ipv4: Remove unused variable in route.c

PATCH Applied Tim Hansen 2 participants 2 messages Oct 4, 2017 – Oct 6, 2017

Subsystems (3)
lore
Share & tools
lore

Tim Hansen

author
#0 lore raw

PATCH 1/1 net/ipv4: Remove unused variable in route.c

int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0.

This was found with coccicheck M=net/ipv4/ on linus' tree.

---
 net/ipv4/route.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
net/ipv4/route.c +1 -2
index 94d4cd2..02b6be9 100644
@@ -3032,7 +3032,6 @@ struct ip_rt_acct __percpu *ip_rt_acct __read_mostly;
 
 int __init ip_rt_init(void)
 {
-	int rc = 0;
 	int cpu;
 
 	ip_idents = kmalloc(IP_IDENTS_SZ * sizeof(*ip_idents), GFP_KERNEL);
@@ -3089,7 +3088,7 @@ int __init ip_rt_init(void)
 #endif
 	register_pernet_subsys(&rt_genid_ops);
 	register_pernet_subsys(&ipv4_inetpeer_ops);
-	return rc;
+	return 0;
 }
 
 #ifdef CONFIG_SYSCTL
Signature · 1 line
2.1.4
maintainer Applied
#1 lore raw

From: Tim Hansen <[email protected]>
Date: Wed, 4 Oct 2017 15:59:49 -0400

Quoted 5 lines

int rc is unmodified after initalization in net/ipv4/route.c, this patch simply cleans up that variable and returns 0.

This was found with coccicheck M=net/ipv4/ on linus' tree.

Applied to net-next.