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 6F710A04AD; Mon, 24 Jan 2022 18:50:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07FEA4289E; Mon, 24 Jan 2022 18:47:59 +0100 (CET) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id B64E642891 for ; Mon, 24 Jan 2022 18:47:55 +0100 (CET) Received: by mail-pj1-f54.google.com with SMTP id d12-20020a17090a628c00b001b4f47e2f51so18375432pjj.3 for ; Mon, 24 Jan 2022 09:47:55 -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=hAtFWarg54jQoemb5xH5gxWjRimoG/VgzXzbglTnerg=; b=4+S28/vEPTHBVHG7heNDhlasPyILlVOfoRhH/wjZFS3hzo3vzPuaLzRr7OV7fBYBDh JKvI71XxHwqjTofjbmUB3O1PRzHaRT8T/0+zDj2lNNVHHuKAvmHzB5eN1BFSkYS5302D D0EEXWl4t2tqXO2nQ4IK1mCJnh5exOkEXmicjzasHyajg8zBaYkyQBLCRcyg+IUJ9h5s b3ammD3q4e435WzM2WcUMg8qN/vt8wdI9XsR7aEC/kqg3Be75uM4w4mqY6/Sd0w4O7ux qYnfaCCtTnZAU+uamxyR96bVGduGQAsSCs5I/sgW7V0KVJv/N90XDlQOQvcl/ehYQK7U 9sxw== 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=hAtFWarg54jQoemb5xH5gxWjRimoG/VgzXzbglTnerg=; b=vxjvb9M4XdxqOApTUTzxqV7MwYRNhaC65AzlzpiIXr4/8wyPgwBnz+jRj05hltwdtl WKdo3HrwvoxGnHnj4/aXXa/0h9P3cDBTMdwuxUastWOyS5v3EQ0AACw1nn4QbOl9ZbkU lQklgeFZu92YYXdW6hOSIEvEU5B9VSoyzMnTb3F1mNMfXzOXXMThlHi5MZ1MUbIklE8q cWjmqJbZGs5XSFXnzctk/gB1m3qTI+z3kOcFjHSqfS5xc6Qn/xELNyAQT7n99rLm9Bhx piwcTQUPE63ezSukvaZ1YWyc42ytfdPdThRezHwp74d1Oo+EzIuG1j9VdqfbF46knyX9 xIXg== X-Gm-Message-State: AOAM531dtZw7n8tnQAahN/jxeKxuE391nVtu7JDs7njoSjnZc89PE1Ko Re6BHag15ieadxKG+bP2810jUNNAePH8kg== X-Google-Smtp-Source: ABdhPJxGGEEHJ84b/ypXw3zHDZi31o78fiUbSopr1mYxzQNAmx0Ooc72nX7VKDL7TZZKS40zUPzsQA== X-Received: by 2002:a17:90a:9c2:: with SMTP id 60mr2920366pjo.17.1643046474789; Mon, 24 Jan 2022 09:47:54 -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.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH v2 30/83] crypto/ccp: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:26 -0800 Message-Id: <20220124174719.14417-31-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/crypto/ccp/ccp_dev.c | 3 +-- drivers/crypto/ccp/ccp_pmd_ops.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ccp/ccp_dev.c b/drivers/crypto/ccp/ccp_dev.c index 0eb1b0328ef0..424ead82c3aa 100644 --- a/drivers/crypto/ccp/ccp_dev.c +++ b/drivers/crypto/ccp/ccp_dev.c @@ -673,8 +673,7 @@ ccp_probe_device(int ccp_type, struct rte_pci_device *pci_dev) CCP_LOG_ERR("CCP Device probe failed"); if (uio_fd >= 0) close(uio_fd); - if (ccp_dev) - rte_free(ccp_dev); + rte_free(ccp_dev); return -1; } diff --git a/drivers/crypto/ccp/ccp_pmd_ops.c b/drivers/crypto/ccp/ccp_pmd_ops.c index 0d615d311c9b..1b600e81ad5c 100644 --- a/drivers/crypto/ccp/ccp_pmd_ops.c +++ b/drivers/crypto/ccp/ccp_pmd_ops.c @@ -744,8 +744,7 @@ ccp_pmd_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, qp_setup_cleanup: dev->data->queue_pairs[qp_id] = NULL; - if (qp) - rte_free(qp); + rte_free(qp); return -1; } -- 2.30.2