* [PATCH] Simplify nvmet_init to remove extra out label
@ 2018-08-09 13:36 Milan P. Gandhi
2018-08-22 13:01 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Milan P. Gandhi @ 2018-08-09 13:36 UTC (permalink / 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] Simplify nvmet_init to remove extra out label
2018-08-09 13:36 [PATCH] Simplify nvmet_init to remove extra out label Milan P. Gandhi
@ 2018-08-22 13:01 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-08-22 13:01 UTC (permalink / raw)
On Thu, Aug 09, 2018@07:06:06PM +0530, Milan P. Gandhi wrote:
> 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>
And what does this buy us?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-22 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-09 13:36 [PATCH] Simplify nvmet_init to remove extra out label Milan P. Gandhi
2018-08-22 13:01 ` Christoph Hellwig
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).