Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexander Gordeev and committed by
Christoph Hellwig
5607de73 029165ac

+3 -2
+3 -2
drivers/scsi/pm8001/pm8001_init.c
··· 763 763 pm8001_ha->irq_vector[i].irq_id = i; 764 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 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 770 for (j = 0; j < i; j++) 770 771 free_irq( 771 772 pm8001_ha->msix_entries[j].vector,