All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ethdev: remove dead code in telemetry handler
@ 2022-02-12 12:36 Gowrishankar Muthukrishnan
  2022-02-14 12:10 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Gowrishankar Muthukrishnan @ 2022-02-12 12:36 UTC (permalink / raw)
  To: dev
  Cc: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko, jerinj,
	Gowrishankar Muthukrishnan

In telemetry handler for port info, there is no need to check if
eth_dev object of a port id is not null, as it had already been
evaluated once in rte_eth_dev_is_valid_port function.

Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Coverity issue: 373635

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 lib/ethdev/rte_ethdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index e03e669c31..3484aa2b32 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6465,8 +6465,6 @@ eth_dev_handle_port_info(const char *cmd __rte_unused,
 		return -EINVAL;
 
 	eth_dev = &rte_eth_devices[port_id];
-	if (!eth_dev)
-		return -EINVAL;
 
 	rxq_state = rte_tel_data_alloc();
 	if (!rxq_state)
-- 
2.25.1


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

end of thread, other threads:[~2022-02-14 12:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 12:36 [PATCH] ethdev: remove dead code in telemetry handler Gowrishankar Muthukrishnan
2022-02-14 12:10 ` Ferruh Yigit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.