staging: lustre: lustre: Remove unneeded else after goto
authorJanani Ravichandran <janani.rvchndrn@gmail.com>
Thu, 18 Feb 2016 22:15:48 +0000 (17:15 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:39:54 +0000 (14:39 -0800)
Remove unnecessary else following an if block with a goto statement.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/lov/lov_pack.c

index 7318b77dc45ab935881587bcc583a8dd6d83007a..389fb9eeea757b8cedcf1a159845a5e1cd6f0e75 100644 (file)
@@ -850,7 +850,8 @@ cfs_cpt_table_create_pattern(char *pattern)
                        if (*str != 0) {
                                CERROR("Invalid pattern %s\n", str);
                                goto failed;
-                       } else if (c != ncpt) {
+                       }
+                       if (c != ncpt) {
                                CERROR("expect %d partitions but found %d\n",
                                       ncpt, c);
                                goto failed;
index 90314c9707aed68dc0e2f0655bec481e2a01e5d1..dcaa5a15d952485742d8ae0a2d4078b614ba1a72 100644 (file)
@@ -399,10 +399,9 @@ static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
                        CDEBUG(D_INFO, "OSC %s already %sactive!\n",
                               uuid->uuid, active ? "" : "in");
                        goto out;
-               } else {
-                       CDEBUG(D_CONFIG, "Marking OSC %s %sactive\n",
-                              obd_uuid2str(uuid), active ? "" : "in");
                }
+               CDEBUG(D_CONFIG, "Marking OSC %s %sactive\n",
+                      obd_uuid2str(uuid), active ? "" : "in");
 
                lov->lov_tgts[index]->ltd_active = active;
                if (active) {
index 468016044b4e44eefb1f5af85e73b59bd9ac2159..4d8abb90ee27f3bbd5b7bcddd858d8a12a2e497b 100644 (file)
@@ -402,8 +402,9 @@ int lov_getstripe(struct obd_export *exp, struct lov_stripe_md *lsm,
        if (copy_from_user(&lum, lump, lum_size)) {
                rc = -EFAULT;
                goto out_set;
-       } else if ((lum.lmm_magic != LOV_USER_MAGIC) &&
-                (lum.lmm_magic != LOV_USER_MAGIC_V3)) {
+       }
+       if ((lum.lmm_magic != LOV_USER_MAGIC) &&
+           (lum.lmm_magic != LOV_USER_MAGIC_V3)) {
                rc = -EINVAL;
                goto out_set;
        }