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 76843A04A6; Mon, 24 Jan 2022 01:08:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A7EAB42856; Mon, 24 Jan 2022 01:05:56 +0100 (CET) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id EA13B427C2 for ; Mon, 24 Jan 2022 01:05:52 +0100 (CET) Received: by mail-pj1-f45.google.com with SMTP id l16so14650585pjl.4 for ; Sun, 23 Jan 2022 16:05:52 -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=KfJxcfk2OwKdySkbfNRuWkyDCDBV+SR2eMnZUhGOAU8t+Wun3NQOltLWIwdZAZNIan r+KUhv8SvnNBt1//Axab4Se2iLf+XoMnlE9a93sgRCyTU4MzqE/RWSr7v4oHLOk6qSiW gPoT3V3SRMAS52QUxFY6VImo2Hqlse+mf9WZ4OeJZhL/hZIHDG/y1Mencp+le0bvlh3q lyWPYyRjQ3WwoVgGT80sd9MdVYbFmQNsugziLVJD45lcdUiec6nswvOLRrX/ZRlAXiWq aExTvEKrby1JDaB5QSyMqfVkag9Rv2NM/UkqvJxE360GmebSqdCq+TtDs87XYDWo4oM0 HVFA== 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=P8WvROgnNCycfy/H7DgtofT7lpr70z88OuuWc/N2nGXXv7/Fy7ATLrudbPl9dO3CPP jqL/6/sMYLlytRhsLkmss7FSdzDO01ZtWB2W5cpV/+sPGw2WSqJ+7nLByq8vTewMnQvH pY6PeY5n8QKbk/d6WEYtLa9VChQayVyfI7m8uFlkCMpqLC+zCK5BrsUsCYIzQfcyHr4E gsGbh5rdE/LWKFgqXYpJvWe+nuD+StG2xCx6Nzsk7Fjr2VcYw/RNw9MZQrFRtIj8SkhY F2tETMqqaoT4s11iBhuNmtuZshgWIGBFKSSPfdfAslDd/kkQ+7fweSlQ0szPFPdayUeu A75g== X-Gm-Message-State: AOAM5307ZZQIzK3Y63pO6YkfKhRQCgICu1VWt7EJwxSfYhMXJgJhRB0H crDyXUxrIN+91I7K94Z8Zi4Dr64FdFl4AQ== X-Google-Smtp-Source: ABdhPJy3wuSS82+XWHiDLMQwWRgwEhP5EPvUKKvzTwqAojCtAoPojyDXzgQvbrIueSTGll2D5U7I5w== X-Received: by 2002:a17:902:9a83:b0:14a:a893:f7ff with SMTP id w3-20020a1709029a8300b0014aa893f7ffmr12388116plp.6.1642982751893; Sun, 23 Jan 2022 16:05:51 -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.05.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:51 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Chandubabu Namburu Subject: [PATCH 29/82] crypto/ccp: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:25 -0800 Message-Id: <20220124000518.319850-30-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/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