hpsa: skip free_irq calls if irqs are not allocated

If try_soft_reset fails to re-allocate irqs, the error exit
starts with free_irq calls, which generate kernel WARN
messages since they were already freed a few lines earlier.

Jump to the next exit label to skip the free_irq calls.

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>
This commit is contained in:
Robert Elliott 2015-04-23 09:34:37 -05:00 committed by James Bottomley
parent 943a7021e8
commit d498757c5e
1 changed files with 6 additions and 1 deletions

View File

@ -7759,7 +7759,12 @@ static int hpsa_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc) {
dev_warn(&h->pdev->dev,
"Failed to request_irq after soft reset.\n");
goto clean4;
/*
* 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.
*/
goto clean3;
}
rc = hpsa_kdump_soft_reset(h);