summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-11-01 06:25:30 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-08 04:23:41 +0100
commit9ae4f8420ed7be4b13c96600e3568c144d101a23 (patch)
treefde8005b2163ebd820874638ba6ff552b642cc78 /drivers/scsi/bnx2fc
parentRevert "scsi: qla2xxx: Fix NVMe Target discovery" (diff)
downloadlinux-9ae4f8420ed7be4b13c96600e3568c144d101a23.tar.xz
linux-9ae4f8420ed7be4b13c96600e3568c144d101a23.zip
scsi: bnx2fc: Fix NULL dereference in error handling
If "interface" is NULL then we can't release it and trying to will only lead to an Oops. Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index cd160f2ec75d..bcd30e2374f1 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2364,7 +2364,7 @@ static int _bnx2fc_create(struct net_device *netdev,
if (!interface) {
printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
rc = -ENOMEM;
- goto ifput_err;
+ goto netdev_err;
}
if (is_vlan_dev(netdev)) {