diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-07-16 14:05:21 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-07-29 08:38:53 -0400 |
commit | 5607de73dbdaeeef67aaae69c769424c638cf3d9 (patch) | |
tree | 6334ae18ef8717a38e8a4420339df3b3980fd65d | |
parent | 029165acfa611a3a8838723f6978586ae35ff53d (diff) |
pm8001: Fix invalid return when request_irq() failed
When a call to request_irq() failed pm8001_setup_msix()
still returns the success. This udate fixes the described
misbehaviour.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Acked-by: Jack Wang <xjtuwjp@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/scsi/pm8001/pm8001_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index 236fba40e540..e49623a897a7 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -763,9 +763,10 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha) | |||
763 | pm8001_ha->irq_vector[i].irq_id = i; | 763 | pm8001_ha->irq_vector[i].irq_id = i; |
764 | pm8001_ha->irq_vector[i].drv_inst = pm8001_ha; | 764 | pm8001_ha->irq_vector[i].drv_inst = pm8001_ha; |
765 | 765 | ||
766 | if (request_irq(pm8001_ha->msix_entries[i].vector, | 766 | rc = request_irq(pm8001_ha->msix_entries[i].vector, |
767 | pm8001_interrupt_handler_msix, flag, | 767 | pm8001_interrupt_handler_msix, flag, |
768 | intr_drvname[i], &(pm8001_ha->irq_vector[i]))) { | 768 | intr_drvname[i], &(pm8001_ha->irq_vector[i])); |
769 | if (rc) { | ||
769 | for (j = 0; j < i; j++) | 770 | for (j = 0; j < i; j++) |
770 | free_irq( | 771 | free_irq( |
771 | pm8001_ha->msix_entries[j].vector, | 772 | pm8001_ha->msix_entries[j].vector, |