util/vfio-helpers: Use error_setg in qemu_vfio_find_[fixed/temp]_iova
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 2 Sep 2021 07:00:22 +0000 (09:00 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 7 Sep 2021 08:08:24 +0000 (09:08 +0100)
commit453095e98dc2cefba81dae800614f136f3c1c341
tree1df5996b679c514286e54a34fc76b292b39be707
parent71e3038c1500e2d6075b306f26d565f982287756
util/vfio-helpers: Use error_setg in qemu_vfio_find_[fixed/temp]_iova

Both qemu_vfio_find_fixed_iova() and qemu_vfio_find_temp_iova()
return an errno which is unused (or overwritten). Have them propagate
eventual errors to callers, returning a boolean (which is what the
Error API recommends, see commit e3fe3988d78 "error: Document Error
API usage rules" for rationale).

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