ethdev: fix redundant function pointer check

RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.

Fixes: e489007a41 ("ethdev: add generic create/destroy ethdev APIs")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
Ferruh Yigit 2018-10-28 01:46:50 +00:00
parent 708e14d8b9
commit 11745065a5

View File

@ -3647,11 +3647,10 @@ rte_eth_dev_destroy(struct rte_eth_dev *ethdev,
return -ENODEV;
RTE_FUNC_PTR_OR_ERR_RET(*ethdev_uninit, -EINVAL);
if (ethdev_uninit) {
ret = ethdev_uninit(ethdev);
if (ret)
return ret;
}
ret = ethdev_uninit(ethdev);
if (ret)
return ret;
return rte_eth_dev_release_port(ethdev);
}