]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/ipn3ke/ipn3ke_ethdev.c
net/txgbe: add queue stats mapping
[dpdk.git] / drivers / net / ipn3ke / ipn3ke_ethdev.c
index 027be29bd860aa0e784fc930d26b817b5aa3438b..4446d2af9efe7e104a7c5548f6e65904dbbcaa9a 100644 (file)
@@ -562,10 +562,8 @@ static int ipn3ke_vswitch_remove(struct rte_afu_device *afu_dev)
                        afu_dev->device.name, i);
 
                ethdev = rte_eth_dev_allocated(afu_dev->device.name);
-               if (!ethdev)
-                       return -ENODEV;
-
-               rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
+               if (ethdev != NULL)
+                       rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
        }
 
        ret = rte_eth_switch_domain_free(hw->switch_domain_id);