From: Matej Vido <vido@cesnet.cz>
To: dev@dpdk.org
Cc: mmcco@mykolab.com, ferruh.yigit@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/szedata2: fix check of mmap return value
Date: Thu, 7 Dec 2017 15:54:42 +0100 [thread overview]
Message-ID: <1512658482-17469-1-git-send-email-vido@cesnet.cz> (raw)
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
next reply other threads:[~2017-12-07 14:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 14:54 Matej Vido [this message]
2017-12-07 18:01 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1512658482-17469-1-git-send-email-vido@cesnet.cz \
--to=vido@cesnet.cz \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=mmcco@mykolab.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).