From a98122ef6601015374bb2d598012331ddfd2b81d Mon Sep 17 00:00:00 2001 From: Santosh Shukla Date: Tue, 20 Feb 2018 22:44:15 +0530 Subject: [PATCH] net/octeontx: fix null pointer dereference Coverity issue: 195040 Fixes: f18b146c498d ("net/octeontx: create ethdev ports") Cc: stable@dpdk.org Signed-off-by: Santosh Shukla --- drivers/net/octeontx/octeontx_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index b739c0b391..0d8937cc2e 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -1149,7 +1149,7 @@ octeontx_create(struct rte_vdev_device *dev, int port, uint8_t evdev, return data->port_id; err: - if (port) + if (nic) octeontx_port_close(nic); if (eth_dev != NULL) { -- 2.20.1