[dpdk-dev] [PATCH] port: fix dead code in ring

Cristian Dumitrescu cristian.dumitrescu at intel.com
Wed Apr 7 12:59:45 CEST 2021


Fix logically dead code in ring port.

Coverity issue: 369664
Fixes: 77a413017c2d ("port: add ring SWX port")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
---
 lib/librte_port/rte_swx_port_ring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_port/rte_swx_port_ring.c b/lib/librte_port/rte_swx_port_ring.c
index 4df720d91..8a076a213 100644
--- a/lib/librte_port/rte_swx_port_ring.c
+++ b/lib/librte_port/rte_swx_port_ring.c
@@ -195,7 +195,7 @@ writer_create(void *args)
 		goto error;
 
 	p->params.name = strdup(params->name);
-	if (!p)
+	if (!p->params.name)
 		goto error;
 
 	p->pkts = calloc(params->burst_size, sizeof(struct rte_mbuf *));
-- 
2.17.1



More information about the dev mailing list