net/octeontx: fix null pointer dereference

Coverity issue: 195040
Fixes: f18b146c49 ("net/octeontx: create ethdev ports")
Cc: stable@dpdk.org

Signed-off-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
This commit is contained in:
Santosh Shukla 2018-02-20 22:44:15 +05:30 committed by Ferruh Yigit
parent e54b560d28
commit a98122ef66

View File

@ -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) {