From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 84B92A04A6; Wed, 9 Feb 2022 13:24:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14C7041143; Wed, 9 Feb 2022 13:24:30 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 87C7840140; Wed, 9 Feb 2022 13:24:28 +0100 (CET) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JtzYm6GzLzbkCP; Wed, 9 Feb 2022 20:23:24 +0800 (CST) Received: from dggpemm500008.china.huawei.com (7.185.36.136) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Feb 2022 20:24:26 +0800 Received: from localhost (10.174.242.157) by dggpemm500008.china.huawei.com (7.185.36.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 9 Feb 2022 20:24:25 +0800 From: Yunjian Wang To: CC: , , , , , Yunjian Wang , Subject: [dpdk-dev] [PATCH] ethdev: remove unnecessary NULL check Date: Wed, 9 Feb 2022 20:24:10 +0800 Message-ID: <86e8c92e29214673983f4387dfc6a24338eae714.1644409051.git.wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.242.157] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm500008.china.huawei.com (7.185.36.136) X-CFilter-Loop: Reflected X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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