@samitouri / QOSamiQemu / commits / 72f663f575

vhost: fix vhost_inflight_buffer_pre_load

While I was rebasing my series about inflight migration, I missed a small issue in vhost_inflight_buffer_preload: * fix wrong return type in function * fix error check Signed-off-by: Alexandr Moshkov <dtalexundeer@yandex-team.ru> Fixes: tag pls? Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20260220094800.276489-1-dtalexundeer@yandex-team.ru>

Alexandr Moshkov committed Feb 20, 2026 at 14:48 UTC 72f663f575ab5e0f31320d7c9f25cc1f086313bd
1 file changed +2 -2
hw/virtio/vhost.c
+2 -2
@@ -1926,8 +1926,8 @@ static bool vhost_inflight_buffer_pre_load(void *opaque, Error **errp)
1926 void *addr = qemu_memfd_alloc("vhost-inflight", inflight->size,
1927 F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL,
1928 &fd, errp);
1929 - if (*errp) {
1930 - return -ENOMEM;
1929 + if (!addr) {
1930 + return false;
1931 }
1932
1933 inflight->offset = 0;