提交 3487d9e7 编写于 作者: R Roland Dreier 提交者: James Bottomley

[SCSI] cxgb3i: Fix error path for module init

If cxgb3i_pdu_init() fails, then it appears that cxgb3i_iscsi_init()
will not be cleaned up, leading to the iscsi transport being left
registered.  Fix this by adding a call to cxgb3i_iscsi_cleanup() on the
error path.
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
Reviewed-by: NMike Christie <michaelc@cs.wisc.edu>
Cc: Karen Xie <kxie@chelsio.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 7407e5bb
......@@ -104,8 +104,10 @@ static int __init cxgb3i_init_module(void)
return err;
err = cxgb3i_pdu_init();
if (err < 0)
if (err < 0) {
cxgb3i_iscsi_cleanup();
return err;
}
cxgb3_register_client(&t3c_client);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册