summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-11-04 13:37:59 +0300
committerBen Hutchings <ben@decadent.org.uk>2019-02-11 17:54:22 +0000
commite57889c3e7bdc385a2d2b4196755333c6c966f78 (patch)
treecf1474a015386c8b579ea15e2af92bb0f4002830
parent6b84af3d2a8afaf0952fdf77ecb9fa72c78df707 (diff)
bnx2fc: fix an error code in _bnx2fc_create()
commit 2043e1fd09c1896bb03a6e25b64baa84a30879c9 upstream. 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> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index a190ab663133..355ca90423e8 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2201,6 +2201,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;
}