-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhpsa-clean-up-error-handling-in-hpsa_remove_one
46 lines (40 loc) · 1.45 KB
/
hpsa-clean-up-error-handling-in-hpsa_remove_one
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
hpsa: make hpsa_remove_one use hpsa_pci_free_init
From: Robert Elliott <[email protected]>
instead of individually releasing various things
Signed-off-by: Robert Elliott <[email protected]>
Signed-off-by: Stephen M. Cameron <[email protected]>
Reviewed-by: Stephen M. Cameron <[email protected]>
---
drivers/scsi/hpsa.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e89b7e6..6bf30a8 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -7702,13 +7702,11 @@ static void hpsa_remove_one(struct pci_dev *pdev)
spin_unlock_irqrestore(&h->lock, flags);
hpsa_unregister_scsi(h); /* unhook from SCSI subsystem */
- /* includes hpsa_free_irqs and hpsa_disable_interrupt_mode */
+ /* includes hpsa_free_irqs */
+ /* includes hpsa_disable_interrupt_mode - pci_init 2 */
hpsa_shutdown(pdev);
destroy_workqueue(h->resubmit_wq);
- iounmap(h->vaddr);
- iounmap(h->transtable);
- iounmap(h->cfgtable);
hpsa_free_device_info(h);
hpsa_free_sg_chain_blocks(h);
hpsa_free_ioaccel2_sg_chain_blocks(h);
@@ -7724,8 +7722,10 @@ static void hpsa_remove_one(struct pci_dev *pdev)
kfree(h->ioaccel1_blockFetchTable);
kfree(h->ioaccel2_blockFetchTable);
kfree(h->hba_inquiry_data);
- pci_disable_device(pdev);
- pci_release_regions(pdev);
+
+ /* includes hpsa_disable_interrupt_mode - pci_init 2 */
+ hpsa_free_pci_init(h);
+
free_percpu(h->lockup_detected);
kfree(h);
}