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

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 <mgandhi@redhat.com>
---
 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);

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-01 12:23 [PATCH] Eliminate extra 'out_free' label from fcoe_init function Milan P. Gandhi
2017-06-01 13:07 ` Johannes Thumshirn
2017-06-01 15:02 ` Dan Carpenter
2017-06-02  3:47   ` Milan P. Gandhi
2017-06-02  5:49     ` Julia Lawall
2017-06-02 12:45       ` 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