diff options
author | Colin Ian King <colin.king@canonical.com> | 2016-11-14 15:59:35 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-15 02:35:48 +0300 |
commit | 7dc62d935459fc48778d9306f2094a8fd16614dd (patch) | |
tree | 1be88dacd10f7bf4d4e4f1c62505feaabbdee629 /drivers/scsi/hpsa.c | |
parent | 63eb7b6bc7a35ce66dbf829850ad9b46fb3ecf5e (diff) | |
download | linux-7dc62d935459fc48778d9306f2094a8fd16614dd.tar.xz |
scsi: hpsa: free irq on q indexed by h->intr_mode and not i
Use correct index on q, use h->intr_mode instead of i. Issue detected
using static analysis with cppcheck
Fixes: bc2bb1543e62a5d0 ("scsi: hpsa: use pci_alloc_irq_vectors and automatic irq affinity")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 9459925566f2..0d4f21c95a40 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -8220,7 +8220,7 @@ static void hpsa_free_irqs(struct ctlr_info *h) if (!h->msix_vectors || h->intr_mode != PERF_MODE_INT) { /* Single reply queue, only one irq to free */ - free_irq(pci_irq_vector(h->pdev, 0), &h->q[i]); + free_irq(pci_irq_vector(h->pdev, 0), &h->q[h->intr_mode]); h->q[h->intr_mode] = 0; return; } |