@samitouri / QOSamiQemu / commits / 706a73473b

vfio/ccw: Return false when IRQ notifier setup fails

vfio_ccw_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: 8aaeff97acee ("vfio/ccw: Make vfio_ccw_register_irq_notifier() return a bool") Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn> Reviewed-by: Eric Farman <farman@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-3-zhaoguohan@kylinos.cn Signed-off-by: Cédric Le Goater <clg@redhat.com>

GuoHan Zhao committed May 10, 2026 at 16:43 UTC 706a73473b8c03af7da6bd23df5ff323f0e86ce9
1 file changed +1
hw/vfio/ccw.c
+1
@@ -431,6 +431,7 @@ static bool vfio_ccw_register_irq_notifier(VFIOCCWDevice *vcdev,
431 VFIO_IRQ_SET_ACTION_TRIGGER, fd, errp)) {
432 qemu_set_fd_handler(fd, NULL, NULL, vcdev);
433 event_notifier_cleanup(notifier);
434 + return false;
435 }
436
437 return true;