提交 5607de73 编写于 作者: A Alexander Gordeev 提交者: Christoph Hellwig

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: NAlexander Gordeev <agordeev@redhat.com>
Acked-by: NJack Wang <xjtuwjp@gmail.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 029165ac
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册