diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-11-01 01:25:30 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-12-07 22:23:41 -0500 |
commit | 9ae4f8420ed7be4b13c96600e3568c144d101a23 (patch) | |
tree | fde8005b2163ebd820874638ba6ff552b642cc78 | |
parent | c64a87f9518409d0a439895f09f6149ffdd427b8 (diff) |
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>
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 |
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, | |||
2364 | if (!interface) { | 2364 | if (!interface) { |
2365 | printk(KERN_ERR PFX "bnx2fc_interface_create failed\n"); | 2365 | printk(KERN_ERR PFX "bnx2fc_interface_create failed\n"); |
2366 | rc = -ENOMEM; | 2366 | rc = -ENOMEM; |
2367 | goto ifput_err; | 2367 | goto netdev_err; |
2368 | } | 2368 | } |
2369 | 2369 | ||
2370 | if (is_vlan_dev(netdev)) { | 2370 | if (is_vlan_dev(netdev)) { |