OSDN Git Service

util/vfio-helpers: Remove unreachable code in qemu_vfio_dma_map()
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 2 Sep 2021 07:00:18 +0000 (09:00 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 7 Sep 2021 08:08:24 +0000 (09:08 +0100)
commit3f4c0affcfbc7c1da0b117bee0cd5be6f52fa3e5
tree2ffd855beae15267917eda1cffe34ce9d498b965
parenta990858b0cc0a7fcbf6e0ee102603e6adbbbbaef
util/vfio-helpers: Remove unreachable code in qemu_vfio_dma_map()

qemu_vfio_add_mapping() returns a pointer to an indexed entry
in pre-allocated QEMUVFIOState::mappings[], thus can not be NULL.
Remove the pointless check.

Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20210902070025.197072-5-philmd@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
util/vfio-helpers.c