aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgb3i
diff options
context:
space:
mode:
authorRoland Dreier <rdreier@cisco.com>2010-04-28 01:39:22 -0400
committerJames Bottomley <James.Bottomley@suse.de>2010-05-02 15:35:23 -0400
commit3487d9e7c4727b3e587f61d2120e35e34f200faa (patch)
tree484e78c0ef60b291023f3895a48cc6037c74e6e3 /drivers/scsi/cxgb3i
parent7407e5bba2cc821950344fd1391d9ad1b7e0b397 (diff)
[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: Roland Dreier <rolandd@cisco.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Karen Xie <kxie@chelsio.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/cxgb3i')
-rw-r--r--drivers/scsi/cxgb3i/cxgb3i_init.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_init.c b/drivers/scsi/cxgb3i/cxgb3i_init.c
index d0ab23a58355..685af3698518 100644
--- a/drivers/scsi/cxgb3i/cxgb3i_init.c
+++ b/drivers/scsi/cxgb3i/cxgb3i_init.c
@@ -104,8 +104,10 @@ static int __init cxgb3i_init_module(void)
104 return err; 104 return err;
105 105
106 err = cxgb3i_pdu_init(); 106 err = cxgb3i_pdu_init();
107 if (err < 0) 107 if (err < 0) {
108 cxgb3i_iscsi_cleanup();
108 return err; 109 return err;
110 }
109 111
110 cxgb3_register_client(&t3c_client); 112 cxgb3_register_client(&t3c_client);
111 113