summary refs log tree commit diff stats
path: root/hw/vfio/helpers.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2025-07-15 13:59:54 +0200
committerCédric Le Goater <clg@redhat.com>2025-07-15 17:11:12 +0200
commit622740aad9f39c4266ce00d7478b32c7506e6642 (patch)
tree153d80605a4e86e79b53f4388d241794774c2d7b /hw/vfio/helpers.c
parentea6788440df37495de6e257ca204cdd669d32b83 (diff)
downloadfocaccia-qemu-622740aad9f39c4266ce00d7478b32c7506e6642.tar.gz
focaccia-qemu-622740aad9f39c4266ce00d7478b32c7506e6642.zip
hw/vfio-user: fix use of uninitialized variable
Coverity reported:

CID 1611805:         Uninitialized variables

in vfio_user_dma_map(). This can occur in the happy path when
->async_ops was not set; as this doesn't typically happen, it wasn't
caught during testing.

Align both map and unmap implementations to initialize ret the same way
to resolve this.

Resolves: Coverity CID 1611805
Fixes: 18e899e6 ("vfio-user: implement VFIO_USER_DMA_MAP/UNMAP")
Reported-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Link: https://lore.kernel.org/qemu-devel/20250715115954.515819-5-john.levon@nutanix.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/helpers.c')
0 files changed, 0 insertions, 0 deletions