From patchwork Thu Jun 1 12:11:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Milan P. Gandhi" X-Patchwork-Id: 9759487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3ED24602BF for ; Thu, 1 Jun 2017 12:11:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2325A2849A for ; Thu, 1 Jun 2017 12:11:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16F33284FC; Thu, 1 Jun 2017 12:11:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BDEA5284AF for ; Thu, 1 Jun 2017 12:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751097AbdFAMLM (ORCPT ); Thu, 1 Jun 2017 08:11:12 -0400 Received: from mail-it0-f41.google.com ([209.85.214.41]:35362 "EHLO mail-it0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbdFAMLL (ORCPT ); Thu, 1 Jun 2017 08:11:11 -0400 Received: by mail-it0-f41.google.com with SMTP id f72so35338617ite.0 for ; Thu, 01 Jun 2017 05:11:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:to:from:subject:organization:message-id :date:user-agent:mime-version:content-transfer-encoding; bh=MXmKIwx8v40AHkURHySvhLDY5NIpnqcef+RXDhbmGzo=; b=aP/gSe91aY6oZoKIy36Mz0ra8+mHSXWu6d5nDn3A0vIMdRROgUE6NUv76jInTvivJ1 cRuj+seEJIQQEH/ptCJkCii6ujiZqSjKQwVJQNx5t8gWJSk2mwvrH/smxfepY2C45qls xcl4EtMMpVpeIIX4AnT4hP4Pepu9De/mebFWSlpvtI0sTAtxMNhxQAYjlG4oGBFc5z7D qQqkiB4XWS5D1hME/jnXOR0tBIsmT6qgDafmDBJ/n1Vi7mQcMBgfO7L9ClAqBQtxm2K4 szTTV67EgHQq9Hla21Zf83U6WYRHeYc640VsdlqmZ3zHuZ84PbyC5t8aCsx7J/kcx8HJ /71Q== X-Gm-Message-State: AODbwcDInqGYtNdwoMfls6suzxlL/o2d/Ua2lt6IlozuuwaCiC79Nyfw 1oBC20DcmmF8/BKccdCunCdp X-Received: by 10.84.217.134 with SMTP id p6mr10135434pli.192.1496319070237; Thu, 01 Jun 2017 05:11:10 -0700 (PDT) Received: from [10.76.1.230] ([125.16.97.114]) by smtp.gmail.com with ESMTPSA id h84sm37443450pfh.45.2017.06.01.05.11.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 05:11:09 -0700 (PDT) Reply-To: mgandhi@redhat.com To: linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, Johannes Thumshirn , Laurence Oberman From: "Milan P. Gandhi" Subject: [PATCH] Eliminate extra 'out_free' label from fcoe_init function Organization: Red Hat Message-ID: Date: Thu, 1 Jun 2017 17:41:06 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Simplify the check for return code of fcoe_if_init routine in fcoe_init function such that we could eliminate need for extra 'out_free' label. Signed-off-by: Milan P. Gandhi --- drivers/scsi/fcoe/fcoe.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index ea21e7b..fb2a4c9 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2523,13 +2523,11 @@ static int __init fcoe_init(void) fcoe_dev_setup(); rc = fcoe_if_init(); - if (rc) - goto out_free; - - mutex_unlock(&fcoe_config_mutex); - return 0; + if (rc == 0) { + mutex_unlock(&fcoe_config_mutex); + return 0; + } -out_free: mutex_unlock(&fcoe_config_mutex); out_destroy: destroy_workqueue(fcoe_wq);