diff options
author | Robert Elliott <elliott@hp.com> | 2015-04-23 09:34:48 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-05-31 11:41:05 -0700 |
commit | b2ef480c4b6548e8287dd231256f7d5eccd0279d (patch) | |
tree | b35d44c178af5be432a353666de176c9113f182e /drivers/scsi | |
parent | 9ecd953aa8b07819af0f1f561f52cb4bd43e8735 (diff) |
hpsa: fix try_soft_reset error handling
If registering the special interrupt handlers in hpsa_init_one
before a soft reset fails, the error exit needs to deallocate
everything that was allocated before.
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Hannes Reinecke <hare@Suse.de>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/hpsa.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 1979b7e45c93..0b8b8808b944 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -7770,9 +7770,15 @@ reinit_after_soft_reset: dev_warn(&h->pdev->dev, "Failed to request_irq after soft reset.\n"); /* - * clean4 starts with free_irqs, but that was just - * done. Then, request_irqs_failed, so there is - * nothing to free. So, goto the next label. + * cannot goto clean7 or free_irqs will be called + * again. Instead, do its work + */ + hpsa_free_performant_mode(h); /* clean7 */ + hpsa_free_sg_chain_blocks(h); /* clean6 */ + hpsa_free_cmd_pool(h); /* clean5 */ + /* + * skip hpsa_free_irqs(h) clean4 since that + * was just called before request_irqs failed */ goto clean3; } @@ -7780,7 +7786,7 @@ reinit_after_soft_reset: rc = hpsa_kdump_soft_reset(h); if (rc) /* Neither hard nor soft reset worked, we're hosed. */ - goto clean4; + goto clean7; dev_info(&h->pdev->dev, "Board READY.\n"); dev_info(&h->pdev->dev, @@ -7801,7 +7807,7 @@ reinit_after_soft_reset: hpsa_undo_allocations_after_kdump_soft_reset(h); try_soft_reset = 0; if (rc) - /* don't go to clean4, we already unallocated */ + /* don't goto clean, we already unallocated */ return -ENODEV; goto reinit_after_soft_reset; |