summaryrefslogtreecommitdiff
path: root/drivers/net/octeontx
diff options
context:
space:
mode:
authorSantosh Shukla <santosh.shukla@caviumnetworks.com>2018-02-20 22:44:15 +0530
committerFerruh Yigit <ferruh.yigit@intel.com>2018-03-30 14:08:43 +0200
commita98122ef6601015374bb2d598012331ddfd2b81d (patch)
tree620cf263aad947a0c3bdcd1593f659cc7dae94e6 /drivers/net/octeontx
parente54b560d2892e540567476e2588be42dbd15d957 (diff)
downloaddpdk-next-eventdev-a98122ef6601015374bb2d598012331ddfd2b81d.zip
dpdk-next-eventdev-a98122ef6601015374bb2d598012331ddfd2b81d.tar.gz
dpdk-next-eventdev-a98122ef6601015374bb2d598012331ddfd2b81d.tar.xz
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 <santosh.shukla@caviumnetworks.com>
Diffstat (limited to 'drivers/net/octeontx')
-rw-r--r--drivers/net/octeontx/octeontx_ethdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index b739c0b..0d8937c 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) {