]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pm8001: Fix invalid return when request_irq() failed
authorAlexander Gordeev <agordeev@redhat.com>
Wed, 16 Jul 2014 18:05:21 +0000 (20:05 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 29 Jul 2014 12:38:53 +0000 (08:38 -0400)
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>
drivers/scsi/pm8001/pm8001_init.c

index 236fba40e54045345c1d33587254bf562b103fac..e49623a897a733d778ca24f8f80a49db16b4aa31 100644 (file)
@@ -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,