summaryrefslogtreecommitdiff
path: root/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-11-04 13:37:59 +0300
committerChristoph Hellwig <hch@lst.de>2014-11-12 14:05:25 +0300
commit2043e1fd09c1896bb03a6e25b64baa84a30879c9 (patch)
treedd002751bf8eede06c771f4fe32bb560d0d5dedc /drivers/scsi/bnx2fc/bnx2fc_fcoe.c
parentb6829c72dff7359039718d2a465133691c9bb5b4 (diff)
downloadlinux-2043e1fd09c1896bb03a6e25b64baa84a30879c9.tar.xz
bnx2fc: fix an error code in _bnx2fc_create()
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>
Diffstat (limited to 'drivers/scsi/bnx2fc/bnx2fc_fcoe.c')
-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 b0d7256997ac..2262c75f45d8 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;
}