vfio-pci: Cleanup on INTx setup failure

Missing some unwind code.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
Alex Williamson 2012-10-08 08:45:30 -06:00
parent 5834a83f48
commit ce59af2dba

View file

@ -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;
}