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 166A5A04AD; Mon, 24 Jan 2022 18:52:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83ED84292E; Mon, 24 Jan 2022 18:48:23 +0100 (CET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by mails.dpdk.org (Postfix) with ESMTP id BB8C04291C for ; Mon, 24 Jan 2022 18:48:20 +0100 (CET) Received: by mail-pl1-f179.google.com with SMTP id c3so16314890pls.5 for ; Mon, 24 Jan 2022 09:48:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=skn4RezxA6fzdblvvu4Dbyud7yUiw8Oo0uSoBCpx7wE=; b=u4oHCG5R05wvD5y9aGwjo9lGvUfIB0SllTrQhNQICSnl3sH3ZbIG0/CtuUAa2n/4ju AjTp+yIaQDVX2FGVnnbOSIKZTnOe4SkTKTRNUUe/xMzy80ipPXD3foLM1rZcMmMWe+aL OywLfuTS5sQz9Ag6WtuJt0a4baSIIJdujbN3Llk9SwGhcQMzXnzi1p+yYrMmeYbx7INi 70v5b260LSt6cO2Lr3ppn1tjhVv26lJpv7WLdWcj3ubp/OIKl5ihufDjid8olF9UQgSZ 6rmNJpU2T/+Zbcn3KqsaRXmC2H9TtFsRKEfNqcx+6acAaLxoBHPxapAegC0LMak9iuhe SjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=skn4RezxA6fzdblvvu4Dbyud7yUiw8Oo0uSoBCpx7wE=; b=WJam9lLOPCCZxJmfVMuKC9Ah4DpFkR6ADeVimuXuMg/X6K0PiUsVxPlL9VIh++gbBT CdKNNvOjJ+brhX9DSPWFlHjxJJYYplWBy2VPLNlzqLvHA+LTWxzE46VWLtXOcVZm1lPK R7U7pyH94+pq0KOvqHiwmRW9O26pgBNbf2zWYVNieXfKnDQw6E1M61ePNGWSRNNffKyK +xha7qmr4vT0dxrjMUneB8kMjcCDiLZjLPLDn6ghxytHfcrYQd8DbNON3z9jqZlr4BYp BkaL/+x9odezsMzUzDVmBEv3UpZNKQjPDdhYhKip/mj44D8+WHnEMnoAPZ/nfqoZgw3w uVRQ== X-Gm-Message-State: AOAM532eLPTe1kwsgil9PqZ63sCOb7DFJsiv14p3Rbn1lVcR/vtZa3ei ggej7t66OrRm5D4S345L3by7cTsZkc5JVA== X-Google-Smtp-Source: ABdhPJzPwzUrtT45ZabmsuQBkv1kzPXoNpWMLJUL6atfWF0KwT3m9zsnj/R/CzGQLpKoZjhRr3ODqw== X-Received: by 2002:a17:90a:156:: with SMTP id z22mr2942706pje.191.1643046499796; Mon, 24 Jan 2022 09:48:19 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Qiming Yang , Qi Zhang Subject: [PATCH v2 53/83] net/ice: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:49 -0800 Message-Id: <20220124174719.14417-54-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> 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 Remove redundant NULL pointer checks before free functions found by nullfree.cocci Signed-off-by: Stephen Hemminger --- drivers/net/ice/ice_fdir_filter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 13a2ac42df87..3fce8e1e6253 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -421,10 +421,8 @@ ice_fdir_release_filter_list(struct ice_pf *pf) { struct ice_fdir_info *fdir_info = &pf->fdir; - if (fdir_info->hash_map) - rte_free(fdir_info->hash_map); - if (fdir_info->hash_table) - rte_hash_free(fdir_info->hash_table); + rte_free(fdir_info->hash_map); + rte_hash_free(fdir_info->hash_table); fdir_info->hash_map = NULL; fdir_info->hash_table = NULL; -- 2.30.2