Skip to contentSkip to conversation

Staging: lustre: Remove unnecessary else after return

PATCH New aybuke ozdemir 1 participant 1 message Feb 20, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Staging: lustre: Remove unnecessary else after return

This patch fixes "else is not generally useful after
a break or return" checkpatch.pl warning using goto statement in fid_request.c

---
Changes since v1:
* removed the "else" block instead of goto statement was used and a commit message has been corrected.
Changes since v2:
* subject heading has been corrected.

---
 drivers/staging/lustre/lustre/fid/fid_request.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/fid/fid_request.c +2 -2
index 063441a..a3a300e 100644
@@ -200,7 +200,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,
 		if (rc) {
 			CERROR("%s: Can't allocate new meta-sequence, rc %d\n",
 			       seq->lcs_name, rc);
-			return rc;
+			goto out;
 		} else {
 			CDEBUG(D_INFO, "%s: New range - "DRANGE"\n",
 			       seq->lcs_name, PRANGE(&seq->lcs_space));
@@ -215,7 +215,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,
 
 	CDEBUG(D_INFO, "%s: Allocated sequence [%#llx]\n", seq->lcs_name,
 	       *seqnr);
-
+out:
 	return rc;
 }
 
Signature · 1 line
1.9.1