Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbdLFTR3 (ORCPT ); Wed, 6 Dec 2017 14:17:29 -0500 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:26837 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752141AbdLFTR2 (ORCPT ); Wed, 6 Dec 2017 14:17:28 -0500 X-IronPort-AV: E=Sophos;i="5.45,369,1508803200"; d="scan'208";a="578473169" From: Luis de Bethencourt To: linux-kernel@vger.kernel.org Cc: devel@driverdev.osuosl.org, lustre-devel@lists.lustre.org, Lai Siyao , Ernestas Kulik , Aastha Gupta , Greg Kroah-Hartman , James Simmons , Andreas Dilger , Oleg Drokin , Luis de Bethencourt Subject: [PATCH 1/3] staging: lustre: llite: Remove else after goto Date: Wed, 6 Dec 2017 19:16:58 +0000 Message-Id: <20171206191700.26532-1-luisbg@kernel.org> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1043 Lines: 38 If an "if" branch is terminated by a "goto", there's no need to have an "else" statement and an indented block of code. Remove the "else" statement to simplify the code flow. Signed-off-by: Luis de Bethencourt --- Hi, The following patches remove unneeded 'else' after a 'goto' or 'return'. They are meant to just make the code more readable and aren't functional changes. Thanks, Luis drivers/staging/lustre/lustre/llite/dir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 5b2e47c246f3..f5b67a4923e3 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1339,9 +1339,9 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg) cmd == LL_IOC_MDC_GETINFO)) { rc = 0; goto skip_lmm; - } else { - goto out_req; } + + goto out_req; } if (cmd == IOC_MDC_GETFILESTRIPE || -- 2.15.1