aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio_pci.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2012-10-08 08:45:30 -0600
committerAlex Williamson <alex.williamson@redhat.com>2012-10-08 08:45:30 -0600
commitce59af2dba6fde2e3990b831f4c9a83641f5609e (patch)
tree2b72c3cad20ddcea9d9472affa4a4aaf343fc991 /hw/vfio_pci.c
parent5834a83f4803de88949162346e6dfa2060d3fca6 (diff)
downloadqemu-ce59af2dba6fde2e3990b831f4c9a83641f5609e.zip
qemu-ce59af2dba6fde2e3990b831f4c9a83641f5609e.tar.gz
qemu-ce59af2dba6fde2e3990b831f4c9a83641f5609e.tar.bz2
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio_pci.c b/hw/vfio_pci.c
index b2383c4..2325272 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;
}