]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
Staging: lustre: lustre: osc: Remove variable that is not very useful.
authorHeena Sirwani <heenasirwani@gmail.com>
Tue, 7 Oct 2014 11:58:30 +0000 (17:28 +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/osc/osc_request.c

index 44657a06b8a54725412e6bf95d5ca3ad67382c1d..ca16c081e9dfeac86344e6ea3063315a83028277 100644 (file)
@@ -3217,8 +3217,6 @@ out_ptlrpcd:
 
 static int osc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
 {
-       int rc = 0;
-
        switch (stage) {
        case OBD_CLEANUP_EARLY: {
                struct obd_import *imp;
@@ -3253,7 +3251,7 @@ static int osc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
                break;
                }
        }
-       return rc;
+       return 0;
 }
 
 int osc_cleanup(struct obd_device *obd)