public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] bnx2fc: fix an error code in _bnx2fc_create()
@ 2014-11-04 10:37 Dan Carpenter
  2014-11-05 20:48 ` Chad Dupuis
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-11-04 10:37 UTC (permalink / raw)
  To: QLogic-Storage-Upstream; +Cc: James E.J. Bottomley, linux-scsi, kernel-janitors

We should be returning an error code here instead of success.  Either
-ENODEV or -ENOMEM would work.  There is also a failure message in
printk().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index dfed4be..251b114 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2195,6 +2195,7 @@ static int _bnx2fc_create(struct net_device *netdev,
 	interface = bnx2fc_interface_create(hba, netdev, fip_mode);
 	if (!interface) {
 		printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
+		rc = -ENOMEM;
 		goto ifput_err;
 	}
 

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

end of thread, other threads:[~2014-11-05 20:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 10:37 [patch 2/2] bnx2fc: fix an error code in _bnx2fc_create() Dan Carpenter
2014-11-05 20:48 ` Chad Dupuis

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