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 BCFB8A04AD; Mon, 24 Jan 2022 18:53:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E4544296F; Mon, 24 Jan 2022 18:48:36 +0100 (CET) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id DBB6342859 for ; Mon, 24 Jan 2022 18:48:33 +0100 (CET) Received: by mail-pg1-f175.google.com with SMTP id q75so16028136pgq.5 for ; Mon, 24 Jan 2022 09:48:33 -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=K+fGgQ3O8aV7+hM8AS0pGVHlsj/aTe5cWmbynvdDUej6Iasq7B8om1Zz2SgJiGzoTL sITILDDp9q5tavMqQYbaDxYrzRIkcUMGMW0nLHIdOvfv5jSNmYyHi6/6mN+aSVX8MT9L KTopVRTPJI9YiFFxmdW+hPzh4GQ0VBfcsTq40cj9aCj2V+vyzk5/wkGoBf18BBNUkIul xxU5YNnlVplaF7+s/3LpRny/0zvEllAGbzJc4VHPTlSkDBfB9AYwQ6g6ppzKYF3w0Cos HwRzCA/hQFUXOKDZMpaberyzupUf2HIAMrGbhscKarbdr4DRKL6GyaADvZSWG0KWTRh0 YVRQ== 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=VA9hv9qDHqcBK3UUCbcK/ZToBFKwlVB8hfT7RnD23sJZ3zmiLHelt2b7UJSOogKKwP 6+/YYugELsx+OEB6BS3OGhUAKh2/JZPz8GP9qA5uLAdINYoXtb8DNPxgmCVECzft3hij ftHmEbvJYWqeJLrq6HkaFw9dNdoBmBnrPWHPgQwcaIIwDjMzsLsNQ+omLVGtEktSzmHz vKDqsOlqkhsXjwzRPHGCQdI7jBTRd0niTldNzcWdFwftvZltr0V/ufjgCEvx64lCggSd gf7DtNaBPfbYm2qpE0QmLBYoNfvv3wJKD5S453PIX5Q4lQPvudDaAhGAtZ78N0w9n0eF 0DQg== X-Gm-Message-State: AOAM532JAHQ1bEoudbwXS/6aowSWXwMXGlxJC8AVCNMfkyIwqz+ft3RO rxLPwNLXZmQwb2w6og3UnBBtRk+BfQw23Q== X-Google-Smtp-Source: ABdhPJwn4ZNLMZCQGtJC4eRy1LDi1LnQBugxHiO0iulJDtSQYq+/wlXGRHy627xrXnJt593+e4i4rw== X-Received: by 2002:a05:6a02:20a:: with SMTP id bh10mr9710108pgb.544.1643046512964; Mon, 24 Jan 2022 09:48:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:32 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Keith Wiles Subject: [PATCH v2 65/83] net/tap: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:01 -0800 Message-Id: <20220124174719.14417-66-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/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