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:
parent
708e14d8b9
commit
11745065a5
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user