From: GuoHan Zhao <[email protected]>
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 <[email protected]>
---
hw/vfio/ccw.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index ff6ab9a7408f..c3dc7c196235 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -431,6 +431,7 @@ static bool vfio_ccw_register_irq_notifier(VFIOCCWDevice
*vcdev,
VFIO_IRQ_SET_ACTION_TRIGGER, fd, errp))
{
qemu_set_fd_handler(fd, NULL, NULL, vcdev);
event_notifier_cleanup(notifier);
+ return false;
}
return true;
--
2.43.0