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 E09AAA0A0A for ; Mon, 24 May 2021 11:38:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF4AA41114; Mon, 24 May 2021 11:38:04 +0200 (CEST) Received: from proxy.6wind.com (host.78.145.23.62.rev.coltfrance.com [62.23.145.78]) by mails.dpdk.org (Postfix) with ESMTP id 6B7AF4003C; Mon, 24 May 2021 11:38:02 +0200 (CEST) Received: from localhost (unknown [10.16.0.39]) by proxy.6wind.com (Postfix) with ESMTP id 48A5B9B4AA9; Mon, 24 May 2021 11:38:02 +0200 (CEST) From: Thierry Herbelot To: dev@dpdk.org Cc: Thierry Herbelot , Thomas Monjalon , stable@dpdk.org, Gagandeep Singh Date: Mon, 24 May 2021 11:37:54 +0200 Message-Id: <20210524093754.21046-1-thierry.herbelot@6wind.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210524085917.16254-1-thierry.herbelot@6wind.com> References: <20210524085917.16254-1-thierry.herbelot@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2] net/pfe: no need to check dev to be NULL Pointer X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" librte_ethdev library is already doing some checks on dev before calling the link update. Fixes: acd4818ea2a45 ("net/pfe: add link status update") Cc: stable@dpdk.org Cc: Gagandeep Singh Signed-off-by: Thierry Herbelot -- V2: rework after noting dev cannot be NULL --- drivers/net/pfe/pfe_ethdev.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/pfe/pfe_ethdev.c b/drivers/net/pfe/pfe_ethdev.c index 3135466713fb..feec4d10a26e 100644 --- a/drivers/net/pfe/pfe_ethdev.c +++ b/drivers/net/pfe/pfe_ethdev.c @@ -582,11 +582,6 @@ pfe_eth_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused) struct rte_eth_link link, old; unsigned int lstatus = 1; - if (dev == NULL) { - PFE_PMD_ERR("Invalid device in link_update.\n"); - return 0; - } - memset(&old, 0, sizeof(old)); memset(&link, 0, sizeof(struct rte_eth_link)); -- 2.29.2