ethdev: fix redundant function pointer check
PATCH 1/1 ethdev: fix redundant function pointer check
RTE_FUNC_PTR_OR_ERR_RET() already does the ethdev_uninit NULL check.
Fixes e489007a411c ("ethdev: add generic create/destroy ethdev APIs")
Signed-off-by Ferruh Yigit <[email protected]>
--- lib/librte_ethdev/rte_ethdev.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
lib/librte_ethdev/rte_ethdev.c +4 -5
@@ -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); }
Signature · 1 line
2.17.2
28/10/2018 02:46, Ferruh Yigit:
Quoted 6 lines
RTE_FUNC_PTR_OR_ERR_RET()already does theethdev_uninitNULL check.Fixes e489007a411c ("ethdev: add generic create/destroy ethdev APIs")Signed-off-by Ferruh Yigit <[email protected]>
Acked-by Thomas Monjalon <[email protected]>
Ferruh Yigit
AppliedQuoted 9 lines · Thomas Monjalon
28/10/2018 02:46, Ferruh Yigit:
Quoted 6 lines
RTE_FUNC_PTR_OR_ERR_RET()already does theethdev_uninitNULL check.Fixes e489007a411c ("ethdev: add generic create/destroy ethdev APIs")Signed-off-by Ferruh Yigit <[email protected]>Acked-by Thomas Monjalon <[email protected]>
Applied to dpdk-next-net/master, thanks.