bnx2fc: fix an error code in _bnx2fc_create()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 4 Nov 2014 10:37:59 +0000 (13:37 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 12 Nov 2014 11:05:25 +0000 (12:05 +0100)
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>
drivers/scsi/bnx2fc/bnx2fc_fcoe.c

index b0d7256997ac9cdbece03c3726b8b4c573aa7e60..2262c75f45d86e40e5c584d147d24cb5ce68f4c0 100644 (file)
@@ -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;
        }