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 88284A04A6; Mon, 24 Jan 2022 01:11:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F4E742916; Mon, 24 Jan 2022 01:06:34 +0100 (CET) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 90221428F8 for ; Mon, 24 Jan 2022 01:06:29 +0100 (CET) Received: by mail-pf1-f181.google.com with SMTP id a8so8884462pfa.6 for ; Sun, 23 Jan 2022 16:06:29 -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=SgZdxQ/v/3DIRfFsYYu4kKYbFgzbBEnlT/pyFLbih4s=; b=b9jw1J71s9zw/fuVmyhIBu2aVfyg1gq0gQmkhwG9jfOSi6thU0rpNaa5dACAaYLhVb JZIKnylK0cqw4jmgSUir2dOzxIy1P8TSrA/14ojfcY3q7UiRX2Rh+zvnHi7jsqxOG3D6 dBKqnjX5YfVBMTscMFGvD/pw/BDdbvLu1IJ6ZBFMADV3NLxBnryOdd7OaeqP7wg2ms4M qp91PifBSQ9DDw8G4hhcTPKCFsYMc8c3Q/P0F3hEdizJ1ngIWoIm5RbIAApDdUsto7G4 OAMgKxgC0i2EmBWavEBvs+g0NipqG9EHu/v26Xynq+VYBbX4QkhkbXT9ATOJlwpmeOXJ LsZQ== 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=SgZdxQ/v/3DIRfFsYYu4kKYbFgzbBEnlT/pyFLbih4s=; b=5UvvzPv5ps43BwqrEnu0s+nSuD8h7AtkUxGw7xJDx7Ga6pPkg35ygh8cdo9C4uXRny G7wormsIWwheWXoaO+4HJoPLwm2vE4wG77oM1aQtqCx125yDQIxZIG24ePWeGxJ/HzOy oUmDYgXCghWVjsZxwj65M0KPsdiUghcRU1bGJecqyniLyshq5EwU7zBbk8FQBc12Bwoo ymhxJSXaG71Az3fz1+iOluMgzxPEIdJefV7Q1HSIk+6tUA+F9LjPPlp20c/yvtlL3l8r r+r4eSTs1ZFw3lkDq3ouqG1gZ1Tz1qc/2rNrkvMUksVhYLFggs0MfgStYGMtGQPCQ0t+ avVA== X-Gm-Message-State: AOAM531ImRI8yWqAJ0Q1CT9c/yIwVrU36snI6mkibooAudM6PdWde3Ac R0yJpnXtB4tRqwHPc6F3o4sBPbFIvuTWVQ== X-Google-Smtp-Source: ABdhPJxSC29klCaimTvn9XE4LrlLOyIrGmQcrK2wBYz3FXnTkEj+l6z1sWdiTiZxVsoVKuq8m0HCoA== X-Received: by 2002:a62:64d4:0:b0:4c9:6871:59b2 with SMTP id y203-20020a6264d4000000b004c9687159b2mr1991385pfb.31.1642982788539; Sun, 23 Jan 2022 16:06:28 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id ck21sm10935350pjb.51.2022.01.23.16.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:28 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Keith Wiles Subject: [PATCH 64/82] net/tap: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:00 -0800 Message-Id: <20220124000518.319850-65-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124000518.319850-1-stephen@networkplumber.org> References: <20220124000518.319850-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/tap/tap_flow.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index 76738239458a..a9a55e439efc 100644 --- a/drivers/net/tap/tap_flow.c +++ b/drivers/net/tap/tap_flow.c @@ -1465,8 +1465,7 @@ tap_flow_create(struct rte_eth_dev *dev, } return flow; fail: - if (remote_flow) - rte_free(remote_flow); + rte_free(remote_flow); if (flow) tap_flow_free(pmd, flow); return NULL; @@ -1541,8 +1540,7 @@ tap_flow_destroy_pmd(struct pmd_internals *pmd, } } end: - if (remote_flow) - rte_free(remote_flow); + rte_free(remote_flow); tap_flow_free(pmd, flow); return ret; } @@ -1764,8 +1762,7 @@ int tap_flow_implicit_create(struct pmd_internals *pmd, success: return 0; fail: - if (remote_flow) - rte_free(remote_flow); + rte_free(remote_flow); return -1; } -- 2.30.2