vfio/ap: Return false when IRQ notifier setup fails
vfio_ap_register_irq_notifier() cleans up the fd handler and EventNotifier when vfio_device_irq_set_signaling() fails, but still returns true to its caller. Return false after cleanup so the caller can handle the failed registration path instead of treating it as a successful notifier setup. Fixes: cbd470f0aac5 ("vfio/ap: Make vfio_ap_register_irq_notifier() return a bool") Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn> Reviewed-by: Anthony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260510084353.58263-2-zhaoguohan@kylinos.cn Signed-off-by: Cédric Le Goater <clg@redhat.com>
GuoHan Zhao committed
May 10, 2026 at 16:43 UTC
6e438309e798f4dccc371001ddefc83404620f65
1 file changed
+1
hw/vfio/ap.c
+1
@@ -193,6 +193,7 @@ static bool vfio_ap_register_irq_notifier(VFIOAPDevice *vapdev,
193
errp)) {
194
qemu_set_fd_handler(fd, NULL, NULL, vapdev);
195
event_notifier_cleanup(notifier);
196
+ return false;
197
}
198
199
return true;