summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanani Ravichandran <janani.rvchndrn@gmail.com>2016-02-18 17:15:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 14:39:54 -0800
commit6c441b971ddc007d6a19302bcbcb05bfa60dce7e (patch)
treebb73505a6a77664c4b1129e3702810d88e74e032
parent7d51a7dab7486a5961ca30909531f70155043a31 (diff)
staging: lustre: lustre: Remove unneeded else after goto
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>
-rw-r--r--drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c3
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_obd.c5
-rw-r--r--drivers/staging/lustre/lustre/lov/lov_pack.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
index 7318b77dc45a..389fb9eeea75 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-cpu.c
@@ -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;
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 90314c9707ae..dcaa5a15d952 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -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) {
diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c
index 468016044b4e..4d8abb90ee27 100644
--- a/drivers/staging/lustre/lustre/lov/lov_pack.c
+++ b/drivers/staging/lustre/lustre/lov/lov_pack.c
@@ -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;
}