diff options
author | Roland Dreier <roland@purestorage.com> | 2011-11-30 20:14:22 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-12-15 01:57:40 -0500 |
commit | c24a1710d18d706ee2bbd87390868242f1a6d8d5 (patch) | |
tree | 685567836441bdbdcb99d960188adbc7eee80e6a /drivers/scsi | |
parent | dab2f6b80cfda6b0ab8b722f7f9e901f971513aa (diff) |
[SCSI] mpt2sas: Fix leak on mpt2sas_base_attach() error path
Commit 911ae9434f83 ("[SCSI] mpt2sas: Added NUNA IO support in driver
which uses multi-reply queue support of the HBA") added new
allocations to the beginning of mpt2sas_base_attach(), which means
directly returning an error on failure of mpt2sas_base_map_resources()
will leak those allocations.
Fix this by doing "goto out_free_resources" in this place too, as the
rest of the function does.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 961b11ea8c04..65c377dc0279 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -4256,7 +4256,7 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc) | |||
4256 | 4256 | ||
4257 | r = mpt2sas_base_map_resources(ioc); | 4257 | r = mpt2sas_base_map_resources(ioc); |
4258 | if (r) | 4258 | if (r) |
4259 | return r; | 4259 | goto out_free_resources; |
4260 | 4260 | ||
4261 | if (ioc->is_warpdrive) { | 4261 | if (ioc->is_warpdrive) { |
4262 | ioc->reply_post_host_index[0] = | 4262 | ioc->reply_post_host_index[0] = |