diff options
author | Sumit.Saxena@lsi.com <Sumit.Saxena@lsi.com> | 2013-05-22 03:00:54 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-06-24 20:24:22 -0400 |
commit | 105900d56e6f8a4dd47bb88fa387ab22ea787884 (patch) | |
tree | 3b551895fac2f2bf6fdcb78e428faa68c3e94b99 /drivers/scsi/megaraid | |
parent | 70b47b881e1e50360cba17417f779953956b960d (diff) |
[SCSI] megaraid_sas: Free event detail memory without device ID check
Free event detail memory from more common place, instead of doing it for
limited device types.
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_sas_base.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 3d1aee7ac604..eadc8c873f45 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c | |||
@@ -4599,10 +4599,6 @@ static void megasas_detach_one(struct pci_dev *pdev) | |||
4599 | break; | 4599 | break; |
4600 | default: | 4600 | default: |
4601 | megasas_release_mfi(instance); | 4601 | megasas_release_mfi(instance); |
4602 | pci_free_consistent(pdev, | ||
4603 | sizeof(struct megasas_evt_detail), | ||
4604 | instance->evt_detail, | ||
4605 | instance->evt_detail_h); | ||
4606 | pci_free_consistent(pdev, sizeof(u32), | 4602 | pci_free_consistent(pdev, sizeof(u32), |
4607 | instance->producer, | 4603 | instance->producer, |
4608 | instance->producer_h); | 4604 | instance->producer_h); |
@@ -4612,6 +4608,9 @@ static void megasas_detach_one(struct pci_dev *pdev) | |||
4612 | break; | 4608 | break; |
4613 | } | 4609 | } |
4614 | 4610 | ||
4611 | if (instance->evt_detail) | ||
4612 | pci_free_consistent(pdev, sizeof(struct megasas_evt_detail), | ||
4613 | instance->evt_detail, instance->evt_detail_h); | ||
4615 | scsi_host_put(host); | 4614 | scsi_host_put(host); |
4616 | 4615 | ||
4617 | pci_set_drvdata(pdev, NULL); | 4616 | pci_set_drvdata(pdev, NULL); |