virtio: fix check when mapping PCI resources
According to the api, rte_eal_pci_map_device is only successful when returning 0. Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
This commit is contained in:
parent
25294cd3a6
commit
7a66c72d6c
@ -795,7 +795,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
|
|||||||
struct virtio_pci_cap cap;
|
struct virtio_pci_cap cap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (rte_eal_pci_map_device(dev) < 0) {
|
if (rte_eal_pci_map_device(dev)) {
|
||||||
PMD_INIT_LOG(DEBUG, "failed to map pci device!");
|
PMD_INIT_LOG(DEBUG, "failed to map pci device!");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user