vfio: fix enabled check on error
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 22 Dec 2017 10:30:36 +0000 (10:30 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 12 Jan 2018 15:02:45 +0000 (16:02 +0100)
commit7b74a6e0b638ce69b9d03367ce85258e0da19807
tree73280e0c02a96c921ad67a4e7c6bfc721cee817b
parent20d2159d4640a1844a5856d8d8df86cf0b24b7c1
vfio: fix enabled check on error

rte_eal_check_module() might return -1, which would have been a
"not false" condition for mod_available. Fix that to only report
vfio being enabled if rte_eal_check_module() returns 1.

Fixes: 221f7c220d6b ("vfio: move global config out of PCI files")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/linuxapp/eal/eal_vfio.c