DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check
@ 2022-02-09 12:24 Yunjian Wang
  2022-02-09 15:32 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Yunjian Wang @ 2022-02-09 12:24 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, thomas, andrew.rybchenko, dingxiaoxiong,
	huangshaozhang, Yunjian Wang, stable

This NULL check is unnecessary, 'eth_dev' is never NULL.

Fixes: 58b43c1ddfd1 ("ethdev: add telemetry endpoint for device info")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.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 29e21ad580..c13149cbd3 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -6312,8 +6312,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.27.0


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09 12:24 [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check Yunjian Wang
2022-02-09 15:32 ` Stephen Hemminger
2022-02-10 11:14   ` 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).