]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: mgc: remove unused variable
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Fri, 27 Feb 2015 12:59:42 +0000 (14:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:28:06 +0000 (16:28 -0800)
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

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

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/mgc/mgc_request.c

index 8d3dbdce04ffee5c0e09de2a92347b9f9f781d03..b24457554798c8c29350957d198eb89b98a2a363 100644 (file)
@@ -690,8 +690,6 @@ static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
 
 static int mgc_cleanup(struct obd_device *obd)
 {
-       int rc;
-
        /* COMPAT_146 - old config logs may have added profiles we don't
           know about */
        if (obd->obd_type->typ_refcnt <= 1)
@@ -701,8 +699,7 @@ static int mgc_cleanup(struct obd_device *obd)
        lprocfs_obd_cleanup(obd);
        ptlrpcd_decref();
 
-       rc = client_obd_cleanup(obd);
-       return rc;
+       return client_obd_cleanup(obd);
 }
 
 static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)