mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
scsi: bnx2fc: Fix NULL dereference in error handling
[ Upstream commit9ae4f8420e
] If "interface" is NULL then we can't release it and trying to will only lead to an Oops. Fixes:aea71a0249
("[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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d013a1cd9c
commit
627fdfac78
1 changed files with 1 additions and 1 deletions
|
@ -2331,7 +2331,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 (netdev->priv_flags & IFF_802_1Q_VLAN) {
|
||||
|
|
Loading…
Reference in a new issue