diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2012-10-08 08:45:30 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2012-10-08 08:45:30 -0600 |
commit | ce59af2dba6fde2e3990b831f4c9a83641f5609e (patch) | |
tree | 2b72c3cad20ddcea9d9472affa4a4aaf343fc991 /hw/vfio_pci.c | |
parent | 5834a83f4803de88949162346e6dfa2060d3fca6 (diff) |
vfio-pci: Cleanup on INTx setup failure
Missing some unwind code.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio_pci.c')
-rw-r--r-- | hw/vfio_pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c index b2383c4b55..2325272c44 100644 --- a/hw/vfio_pci.c +++ b/hw/vfio_pci.c @@ -285,6 +285,8 @@ static int vfio_enable_intx(VFIODevice *vdev) if (ioctl(vdev->fd, VFIO_DEVICE_SET_IRQS, &irq_set_fd)) { error_report("vfio: Error: Failed to setup INTx fd: %m\n"); + qemu_set_fd_handler(irq_set_fd.fd, NULL, NULL, vdev); + event_notifier_cleanup(&vdev->intx.interrupt); return -errno; } |