Commit 72f663f575 for qemu.org

commit 72f663f575ab5e0f31320d7c9f25cc1f086313bd
Author: Alexandr Moshkov <dtalexundeer@yandex-team.ru>
Date:   Fri Feb 20 14:48:01 2026 +0500

    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>

diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 52801c1796..f83bdcaf8b 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1926,8 +1926,8 @@ static bool vhost_inflight_buffer_pre_load(void *opaque, Error **errp)
     void *addr = qemu_memfd_alloc("vhost-inflight", inflight->size,
                                   F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_SEAL,
                                   &fd, errp);
-    if (*errp) {
-        return -ENOMEM;
+    if (!addr) {
+        return false;
     }

     inflight->offset = 0;