ipvs: remove unused variable
authorArushi Singhal <arushisinghal19971997@gmail.com>
Wed, 29 Mar 2017 14:57:52 +0000 (20:27 +0530)
committerSimon Horman <horms@verge.net.au>
Thu, 30 Mar 2017 12:54:47 +0000 (14:54 +0200)
This patch uses the following coccinelle script to remove
a variable that was simply used to store the return
value of a function call before returning it:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_ftp.c

index 2e2bf7428cd152aa37afe39b1c80389339abb746..6caf4459e981165cca3686b3ee426732e75fb6bc 100644 (file)
@@ -482,11 +482,8 @@ static struct pernet_operations ip_vs_ftp_ops = {
 
 static int __init ip_vs_ftp_init(void)
 {
-       int rv;
-
-       rv = register_pernet_subsys(&ip_vs_ftp_ops);
        /* rcu_barrier() is called by netns on error */
-       return rv;
+       return register_pernet_subsys(&ip_vs_ftp_ops);
 }
 
 /*