linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mgandhi@redhat.com (Milan P. Gandhi)
Subject: [PATCH] Simplify nvmet_init to remove extra out label
Date: Thu, 9 Aug 2018 19:06:06 +0530	[thread overview]
Message-ID: <20180809133606.GA11730@machine1> (raw)

The 2nd out label at end could easily be removed by returning
an error upon receiving a non-zero error return code from
nvmet_init_discovery. This would avoid need for 2nd out
label.

Signed-off-by: Milan P. Gandhi <mgandhi at redhat.com>
---
 drivers/nvme/target/core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index b40fb6d724b4..e667a3fa0d9b 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1109,7 +1109,7 @@ static int __init nvmet_init(void)
 
 	error = nvmet_init_discovery();
 	if (error)
-		goto out;
+		return error;
 
 	error = nvmet_init_configfs();
 	if (error)
@@ -1118,7 +1118,6 @@ static int __init nvmet_init(void)
 
 out_exit_discovery:
 	nvmet_exit_discovery();
-out:
 	return error;
 }
 
-- 
2.14.3

             reply	other threads:[~2018-08-09 13:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-09 13:36 Milan P. Gandhi [this message]
2018-08-22 13:01 ` [PATCH] Simplify nvmet_init to remove extra out label Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180809133606.GA11730@machine1 \
    --to=mgandhi@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).