* [dpdk-dev] [PATCH] net/szedata2: fix check of mmap return value
@ 2017-12-07 14:54 Matej Vido
2017-12-07 18:01 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Matej Vido @ 2017-12-07 14:54 UTC (permalink / raw)
To: dev; +Cc: mmcco, ferruh.yigit, stable
Fixes: 9eddbdb4b094 ("szedata2: support link state operations")
Cc: stable@dpdk.org
Signed-off-by: Matej Vido <vido@cesnet.cz>
---
drivers/net/szedata2/rte_eth_szedata2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c
index 74f151c..af0580a 100644
--- a/drivers/net/szedata2/rte_eth_szedata2.c
+++ b/drivers/net/szedata2/rte_eth_szedata2.c
@@ -1553,7 +1553,7 @@ struct pmd_internals {
pci_dev->mem_resource[PCI_RESOURCE_NUMBER].len,
PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
- if (pci_resource_ptr == NULL) {
+ if (pci_resource_ptr == MAP_FAILED) {
RTE_LOG(ERR, PMD, "Could not mmap file %s (fd = %d)\n",
rsc_filename, fd);
return -EINVAL;
--
1.8.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-07 18:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-07 14:54 [dpdk-dev] [PATCH] net/szedata2: fix check of mmap return value Matej Vido
2017-12-07 18:01 ` Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).