diff mbox

[dpdk-dev] net/szedata2: fix check of mmap return value

Message ID 1512658482-17469-1-git-send-email-vido@cesnet.cz (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Matej Vido Dec. 7, 2017, 2:54 p.m. UTC
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(-)

Comments

Ferruh Yigit Dec. 7, 2017, 6:01 p.m. UTC | #1
On 12/7/2017 6:54 AM, Matej Vido wrote:
> Fixes: 9eddbdb4b094 ("szedata2: support link state operations")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Matej Vido <vido@cesnet.cz>

Applied to dpdk-next-net/master, thanks.
diff mbox

Patch

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;