summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_pci.c
diff options
context:
space:
mode:
authorDavid Marchand <david.marchand@6wind.com>2016-02-16 21:37:02 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-02-16 22:55:44 +0100
commit7a66c72d6cd6617888d1e20082d923a80abff836 (patch)
tree28b10d033063c02e5f53da6b67af6809ba60718f /drivers/net/virtio/virtio_pci.c
parent25294cd3a6d55cf9574d457b40c29551bb9b6d3b (diff)
downloaddpdk-next-eventdev-7a66c72d6cd6617888d1e20082d923a80abff836.zip
dpdk-next-eventdev-7a66c72d6cd6617888d1e20082d923a80abff836.tar.gz
dpdk-next-eventdev-7a66c72d6cd6617888d1e20082d923a80abff836.tar.xz
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>
Diffstat (limited to 'drivers/net/virtio/virtio_pci.c')
-rw-r--r--drivers/net/virtio/virtio_pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 762e91c..b4d4476 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -795,7 +795,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
struct virtio_pci_cap cap;
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!");
return -1;
}