From 8bcb2f48523b78d6963a8f3be3e912841b4afd89 Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Thu, 28 Oct 2021 14:15:17 +0000 Subject: [PATCH] vfio: fix FreeBSD clear group stub [ upstream commit bf8b792f3b8519fecf3585ffac15da6f7bca2de9 ] 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") Signed-off-by: Anatoly Burakov --- lib/librte_eal/freebsd/eal/eal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c index d97651725b..e148d431c1 100644 --- a/lib/librte_eal/freebsd/eal/eal.c +++ b/lib/librte_eal/freebsd/eal/eal.c @@ -1028,7 +1028,7 @@ int rte_vfio_noiommu_is_enabled(void) int rte_vfio_clear_group(__rte_unused int vfio_group_fd) { - return 0; + return -1; } int