From: Yunjian Wang Date: Wed, 9 Feb 2022 12:24:10 +0000 (+0800) Subject: ethdev: remove unnecessary null check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8b8dd4451da45ce0419521d7e29fe246a5278251;p=dpdk.git ethdev: remove unnecessary null check 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 Acked-by: Stephen Hemminger Reviewed-by: Ferruh Yigit --- diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 3755a31795..155978c233 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)