提交 7dc62d93 编写于 作者: C Colin Ian King 提交者: Martin K. Petersen

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: bc2bb154 ("scsi: hpsa: use pci_alloc_irq_vectors and automatic irq affinity")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 63eb7b6b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册