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 50FABA04FD; Sun, 20 Mar 2022 11:11:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4A65410EE; Sun, 20 Mar 2022 11:11:03 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 28C82410D4 for ; Sun, 20 Mar 2022 11:11:03 +0100 (CET) Received: from bree.oktetlabs.ru (bree.oktetlabs.ru [192.168.34.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPS id 3EBBD38; Sun, 20 Mar 2022 13:11:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 3EBBD38 Authentication-Results: shelob.oktetlabs.ru/3EBBD38; dkim=none; dkim-atps=neutral From: Ivan Malov To: dev@dpdk.org Cc: Andy Moreton , Andrew Rybchenko Subject: [PATCH] net/sfc: drop futile null check Date: Sun, 20 Mar 2022 13:11:00 +0300 Message-Id: <20220320101100.3188748-1-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The NULL pointer check is clearly unneeded. Signed-off-by: Ivan Malov Reviewed-by: Andrew Rybchenko --- drivers/net/sfc/sfc_mae.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index b34c9afd5b..f9b0a60528 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -1209,18 +1209,12 @@ void sfc_mae_flow_cleanup(struct sfc_adapter *sa, struct rte_flow *flow) { - struct sfc_flow_spec *spec; struct sfc_flow_spec_mae *spec_mae; if (flow == NULL) return; - spec = &flow->spec; - - if (spec == NULL) - return; - - spec_mae = &spec->mae; + spec_mae = &flow->spec.mae; if (spec_mae->ft != NULL) { if (spec_mae->ft_rule_type == SFC_FT_RULE_JUMP) -- 2.30.2