提交 2043e1fd 编写于 作者: D Dan Carpenter 提交者: Christoph Hellwig

bnx2fc: fix an error code in _bnx2fc_create()

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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 b6829c72
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册