patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] ethdev: fix redundant function pointer check
@ 2018-10-28  1:46 Ferruh Yigit
  2018-10-28  9:43 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-10-28  1:46 UTC (permalink / raw)
  To: Thomas Monjalon, Andrew Rybchenko; +Cc: dev, Ferruh Yigit, stable

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

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

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index b2ac590ae..219795e41 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -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);
 }
-- 
2.17.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix redundant function pointer check
  2018-10-28  1:46 [dpdk-stable] [PATCH] ethdev: fix redundant function pointer check Ferruh Yigit
@ 2018-10-28  9:43 ` Thomas Monjalon
  2018-11-02 20:34   ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2018-10-28  9:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Andrew Rybchenko, stable

28/10/2018 02:46, Ferruh Yigit:
> RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.
> 
> Fixes: e489007a411c ("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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] ethdev: fix redundant function pointer check
  2018-10-28  9:43 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
@ 2018-11-02 20:34   ` Ferruh Yigit
  0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-11-02 20:34 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Andrew Rybchenko, stable

On 10/28/2018 9:43 AM, Thomas Monjalon wrote:
> 28/10/2018 02:46, Ferruh Yigit:
>> RTE_FUNC_PTR_OR_ERR_RET() already does the `ethdev_uninit` NULL check.
>>
>> Fixes: e489007a411c ("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>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-02 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28  1:46 [dpdk-stable] [PATCH] ethdev: fix redundant function pointer check Ferruh Yigit
2018-10-28  9:43 ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2018-11-02 20:34   ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).