Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65F30C04FF3 for ; Mon, 24 May 2021 09:38:05 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id CD5AF6117A for ; Mon, 24 May 2021 09:38:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD5AF6117A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=6wind.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA8C04003E; Mon, 24 May 2021 11:38:03 +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-dev] [PATCH v2] net/pfe: no need to check dev to be NULL Pointer 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 Sender: "dev" 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