Message ID | 20230630052235.1934154-16-clg@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,01/16] migration: Add switchover ack capability | expand |
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 73e19a04b2bf..48df517f79ee 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3221,7 +3221,9 @@ static void vfio_realize(PCIDevice *pdev, Error **errp) out_deregister: pci_device_set_intx_routing_notifier(&vdev->pdev, NULL); - kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier); + if (vdev->irqchip_change_notifier.notify) { + kvm_irqchip_remove_change_notifier(&vdev->irqchip_change_notifier); + } out_teardown: vfio_teardown_msi(vdev); vfio_bars_exit(vdev);