From: Santosh Shukla Date: Tue, 20 Feb 2018 17:14:15 +0000 (+0530) Subject: net/octeontx: fix null pointer dereference X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a98122ef6601015374bb2d598012331ddfd2b81d;p=dpdk.git 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 --- 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) {