public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] Eliminate extra 'out_free' label from fcoe_init function
@ 2017-06-02 12:39 Milan P. Gandhi
  2017-06-02 13:01 ` walter harms
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Milan P. Gandhi @ 2017-06-02 12:39 UTC (permalink / raw)
  To: Johannes Thumshirn, Julia Lawall, Dan Carpenter, Laurence Oberman,
	linux-scsi
  Cc: kernel-janitors

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 and duplicate mutex_unlock statement.

Signed-off-by: Milan P. Gandhi <mgandhi@redhat.com>
---
 drivers/scsi/fcoe/fcoe.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index ea21e7b..a2cf3d0 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -2523,14 +2523,13 @@ static int __init fcoe_init(void)
 	fcoe_dev_setup();
 
 	rc = fcoe_if_init();
+	mutex_unlock(&fcoe_config_mutex);
+
 	if (rc)
-		goto out_free;
+		goto out_destroy;
 
-	mutex_unlock(&fcoe_config_mutex);
 	return 0;
 
-out_free:
-	mutex_unlock(&fcoe_config_mutex);
 out_destroy:
 	destroy_workqueue(fcoe_wq);
 	return rc;

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-05  4:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-02 12:39 [PATCH RESEND] Eliminate extra 'out_free' label from fcoe_init function Milan P. Gandhi
2017-06-02 13:01 ` walter harms
2017-06-02 16:07   ` Julia Lawall
2017-06-03  2:35   ` Dan Carpenter
2017-06-02 16:06 ` Julia Lawall
2017-06-03  2:34 ` Dan Carpenter
2017-06-05  4:12   ` Milan P. Gandhi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox