Staging: lustre: lustre: lmv: Removed variable that is not very useful.
authorHeena Sirwani <heenasirwani@gmail.com>
Tue, 7 Oct 2014 11:56:14 +0000 (17:26 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:10 +0000 (10:29 +0800)
The following patch removes a variable that is not very useful using
coccinelle.
The semantic patch used was:
@@
identifier ret;
@@

-int ret = 0;
 ... when != ret
     when strict
-return ret;
+return 0;

Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lmv/lmv_obd.c

index 1a58212..9543c15 100644 (file)
@@ -2310,7 +2310,6 @@ retry:
 static int lmv_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
 {
        struct lmv_obd *lmv = &obd->u.lmv;
-       int rc = 0;
 
        switch (stage) {
        case OBD_CLEANUP_EARLY:
@@ -2324,7 +2323,7 @@ static int lmv_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
        default:
                break;
        }
-       return rc;
+       return 0;
 }
 
 static int lmv_get_info(const struct lu_env *env, struct obd_export *exp,