aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vfio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vfio')
-rw-r--r--drivers/vfio/pci/vfio_pci_intrs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index d8dedc7d3910..c8139a598f84 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -400,19 +400,20 @@ static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd)
400 return PTR_ERR(trigger); 400 return PTR_ERR(trigger);
401 } 401 }
402 402
403 vdev->ctx[0].trigger = trigger;
404
403 if (!vdev->pci_2_3) 405 if (!vdev->pci_2_3)
404 irqflags = 0; 406 irqflags = 0;
405 407
406 ret = request_irq(pdev->irq, vfio_intx_handler, 408 ret = request_irq(pdev->irq, vfio_intx_handler,
407 irqflags, vdev->ctx[0].name, vdev); 409 irqflags, vdev->ctx[0].name, vdev);
408 if (ret) { 410 if (ret) {
411 vdev->ctx[0].trigger = NULL;
409 kfree(vdev->ctx[0].name); 412 kfree(vdev->ctx[0].name);
410 eventfd_ctx_put(trigger); 413 eventfd_ctx_put(trigger);
411 return ret; 414 return ret;
412 } 415 }
413 416
414 vdev->ctx[0].trigger = trigger;
415
416 /* 417 /*
417 * INTx disable will stick across the new irq setup, 418 * INTx disable will stick across the new irq setup,
418 * disable_irq won't. 419 * disable_irq won't.