From: Alexander Gordeev Date: Wed, 16 Jul 2014 18:05:21 +0000 (+0200) Subject: pm8001: Fix invalid return when request_irq() failed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5607de73dbdaeeef67aaae69c769424c638cf3d9;p=linux-beck.git 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 Acked-by: Jack Wang Signed-off-by: Christoph Hellwig --- 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) 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,