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 56160A04AD; Mon, 24 Jan 2022 18:52:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEA6F42945; Mon, 24 Jan 2022 18:48:26 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id 2AA6142932 for ; Mon, 24 Jan 2022 18:48:24 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d7so16301087plr.12 for ; Mon, 24 Jan 2022 09:48:24 -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=8uCh2fmiVJ0Fv7CxbxcyCYgCxrp8a63KW8vHU+YPmcU=; b=xC2OyXQawY7EVtvdipT4/76i2rbeq+V5ac3lR8o4WDjiHMzTl1eQBq9R+lJxL/0V9q XfcbasCN2mf3FTERHtg2Q7C7VQcSZOIWzsjYUFg5akIZExnw9MMZKd8PddsiwdTabSoM lnoXn1ZCTswWpsK8afegYvsBqdR/ohVc60Zo9N8V57AlNNmsBOUlWVYi+tq0lv5cp0/B NZnafEVILWlJc1Hc1qpOP2eEV9IfztSAOYoznxAqRuyguOWmAdzyo5PKZP9MkNGTqzcj nAvRsBYUaMjsgaa5V4Kl3o6k4W2vMrkjMv7gD6O0LTtCVaa7UleI9m4sAs0NgE7ehnAR lf2A== 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=8uCh2fmiVJ0Fv7CxbxcyCYgCxrp8a63KW8vHU+YPmcU=; b=EoSEwCCRSzQhViOOS6bqRh6O1ZZx/9twjKArpfYXfiqtQTUjvQPIAOoLyP5gbjbNZB DoWonK8moPmGt2BBtm85oCNmBbW0BiDB4BrPusiKNnC/CVcGA0H6VdvbeMlewqTVRo0s O7Kq0rm6b/J8KllPePE/IahFtdkJ6efgzqxr1qnUYgefHtea8ELkLkP+5GDFnf1tjdRm wgKcpz1ocLIoTxr231Lhsp71jQNbLt2X4SI21Yh3mPAC9Elld/OhG8fm7S9mDRKmsXS1 xZI93VMfSlam9b9DOPYglcJGPorcA+6JVi0I3sjffIUvMFn72123GifBx7xd+Ri0uy1y rkLQ== X-Gm-Message-State: AOAM530+0f+1g6S6p3rVCmqvHeKqvE1blm/yCuMlf4hQ7Dl612+qloTG 9qTByG7pa/wD8A2WWE4r9dwkxocTzWsuqA== X-Google-Smtp-Source: ABdhPJwDhJTDp7fXOoTZWWGeYngiRTQu7ECKkatG6IQzGIxLKICgUG3rhfLVaArb213IKjKtq891Sg== X-Received: by 2002:a17:902:bd05:b0:148:a2f7:9d87 with SMTP id p5-20020a170902bd0500b00148a2f79d87mr15319090pls.166.1643046503186; Mon, 24 Jan 2022 09:48:23 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:22 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jakub Grajciar Subject: [PATCH v2 56/83] net/memif: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:52 -0800 Message-Id: <20220124174719.14417-57-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/memif/rte_eth_memif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 59cb5a82a23f..5c2203f5270b 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1731,8 +1731,7 @@ memif_check_socket_filename(const char *filename) ret = -EINVAL; } - if (dir != NULL) - rte_free(dir); + rte_free(dir); return ret; } @@ -1903,8 +1902,7 @@ rte_pmd_memif_probe(struct rte_vdev_device *vdev) log2_ring_size, pkt_buffer_size, secret, ether_addr); exit: - if (kvlist != NULL) - rte_kvargs_free(kvlist); + rte_kvargs_free(kvlist); return ret; } -- 2.30.2