DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yunjian Wang <wangyunjian@huawei.com>
To: <dev@dpdk.org>
Cc: <ferruh.yigit@intel.com>, <thomas@monjalon.net>,
	<andrew.rybchenko@oktetlabs.ru>, <dingxiaoxiong@huawei.com>,
	<huangshaozhang@huawei.com>,
	Yunjian Wang <wangyunjian@huawei.com>, <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check
Date: Wed, 9 Feb 2022 20:24:10 +0800	[thread overview]
Message-ID: <86e8c92e29214673983f4387dfc6a24338eae714.1644409051.git.wangyunjian@huawei.com> (raw)

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


             reply	other threads:[~2022-02-09 12:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 12:24 Yunjian Wang [this message]
2022-02-09 15:32 ` Stephen Hemminger
2022-02-10 11:14   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86e8c92e29214673983f4387dfc6a24338eae714.1644409051.git.wangyunjian@huawei.com \
    --to=wangyunjian@huawei.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=dingxiaoxiong@huawei.com \
    --cc=ferruh.yigit@intel.com \
    --cc=huangshaozhang@huawei.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).