提交 9ae4f842 编写于 作者: D Dan Carpenter 提交者: Martin K. Petersen

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: aea71a02 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 c64a87f9
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册