]> git.droids-corp.org - dpdk.git/blobdiff - drivers/bus/pci/bsd/pci.c
pci: keep API compatibility with mmap values
[dpdk.git] / drivers / bus / pci / bsd / pci.c
index 8bc473eb9a0509b652b4f834b24dbc016ea3af60..6ec27b4b5be8f70757abeb6db37d7fe1bd796cf2 100644 (file)
@@ -192,7 +192,7 @@ pci_uio_map_resource_by_index(struct rte_pci_device *dev, int res_idx,
        mapaddr = pci_map_resource(NULL, fd, (off_t)offset,
                        (size_t)dev->mem_resource[res_idx].len, 0);
        close(fd);
-       if (mapaddr == NULL)
+       if (mapaddr == MAP_FAILED)
                goto error;
 
        maps[map_idx].phaddr = dev->mem_resource[res_idx].phys_addr;