From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DC4CA1BFF0F for ; Wed, 30 Aug 2017 17:37:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D6D5F2EEAB for ; Wed, 30 Aug 2017 17:37:25 +0000 (UTC) Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s71vhUAkV4N4 for ; Wed, 30 Aug 2017 17:37:25 +0000 (UTC) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0086.outbound.protection.outlook.com [104.47.42.86]) by silver.osuosl.org (Postfix) with ESMTPS id 13C742E71F for ; Wed, 30 Aug 2017 17:37:25 +0000 (UTC) From: David Kershner Subject: [PATCH 16/28] staging: unisys: visorbus: Split else if blocks into multiple if. Date: Wed, 30 Aug 2017 13:36:23 -0400 Message-ID: <2e7a9ca926e996f303aed31de2b7988ef226b39c.1504109643.git-series.david.kershner@unisys.com> In-Reply-To: References: MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: gregkh@linuxfoundation.org, driverdev-devel@linuxdriverproject.org, sparmaintainer@unisys.com, jes.sorensen@gmail.com Visorbus_configure had a block of "else if" clauses at the beginning of the function. Simplify this to just being "if" clauses since each code block ended with a goto. Signed-off-by: David Kershner Reviewed-by: Tim Sell --- drivers/staging/unisys/visorbus/visorchipset.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index e5d051f..3a8357e 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -717,10 +717,12 @@ static int visorbus_configure(struct controlvm_message *inmsg, if (!bus_info) { err = -EINVAL; goto err_respond; - } else if (bus_info->state.created == 0) { + } + if (bus_info->state.created == 0) { err = -EINVAL; goto err_respond; - } else if (bus_info->pending_msg_hdr) { + } + if (bus_info->pending_msg_hdr) { err = -EIO; goto err_respond; } -- git-series 0.9.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel