From patchwork Thu Oct 4 22:18:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [11/11] vfio-pci: Cleanup on INTx setup failure Date: Thu, 04 Oct 2012 12:18:45 -0000 From: Alex Williamson X-Patchwork-Id: 189358 Message-Id: <20121004221844.3189.88455.stgit@bling.home> To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com Missing some unwind code. Signed-off-by: Alex Williamson --- hw/vfio_pci.c | 2 ++ 1 file changed, 2 insertions(+) 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; }