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>
This commit is contained in:
parent
029165acfa
commit
5607de73db
1 changed files with 3 additions and 2 deletions
|
@ -763,9 +763,10 @@ static u32 pm8001_setup_msix(struct pm8001_hba_info *pm8001_ha)
|
|||
pm8001_ha->irq_vector[i].irq_id = i;
|
||||
pm8001_ha->irq_vector[i].drv_inst = pm8001_ha;
|
||||
|
||||
if (request_irq(pm8001_ha->msix_entries[i].vector,
|
||||
rc = request_irq(pm8001_ha->msix_entries[i].vector,
|
||||
pm8001_interrupt_handler_msix, flag,
|
||||
intr_drvname[i], &(pm8001_ha->irq_vector[i]))) {
|
||||
intr_drvname[i], &(pm8001_ha->irq_vector[i]));
|
||||
if (rc) {
|
||||
for (j = 0; j < i; j++)
|
||||
free_irq(
|
||||
pm8001_ha->msix_entries[j].vector,
|
||||
|
|
Loading…
Reference in a new issue