vfio: fix FreeBSD clear group stub
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 28 Oct 2021 14:15:17 +0000 (14:15 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 8 Nov 2021 15:42:44 +0000 (16:42 +0100)
On FreeBSD, `rte_vfio_clear_group()` was returning 0 even though this
function is not valid for FreeBSD, and is called out to return error in
doxygen comments.
Fix the return value to match documentation.

Fixes: c564a2a20093 ("vfio: expose clear group function for internal usages")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/eal/freebsd/eal.c

index 2c2baaa..5cea368 100644 (file)
@@ -1045,7 +1045,7 @@ int rte_vfio_noiommu_is_enabled(void)
 
 int rte_vfio_clear_group(__rte_unused int vfio_group_fd)
 {
-       return 0;
+       return -1;
 }
 
 int