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 F3679A04AD; Mon, 24 Jan 2022 18:49:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 58BA042885; Mon, 24 Jan 2022 18:47:54 +0100 (CET) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by mails.dpdk.org (Postfix) with ESMTP id 7B3554280E for ; Mon, 24 Jan 2022 18:47:51 +0100 (CET) Received: by mail-pg1-f172.google.com with SMTP id 187so15827018pga.10 for ; Mon, 24 Jan 2022 09:47:51 -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=X1J0QmXruFq87E8wAPFLKFy3yvEdi4WKgxvgj4zkKRs=; b=7LPk+VLgOmVVEDD05eZyrtkKqZW+ZMgj5m+CPkNguVn3brF/yfPeIwUh3TAMVlI1qC VLsDfqpsqr2booRGxhg5mdU9xqSpks6FDHkaJCnHQLndWXDVrkq8B5K4z60r3ZVNSo9u oVLBci7IxSyHhYdmwh65JxsDqShyhiv2BeZxiP8y5wGCOYeXnLUJMlpgQavi9TddSHFK 6oc2pFz9Hp2lJUHJlPExOgztsYn+9eLLPwXyyPI/EFpz4UwcR+52hKttbBsZcR3Noq3L AniqkvMbGU4h9Hd4Z5W0S5aTpwJr4DI6MCNw3fCIGay5KeerzoM9h3o8XmwGZvP+fop9 fh1A== 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=X1J0QmXruFq87E8wAPFLKFy3yvEdi4WKgxvgj4zkKRs=; b=36SIAgSmUUgs6k8znLMCNHzJDUmuZ+8bpBGSSBfUOYrU4muMHY3cRmn1lqBGKjbyWk dr1Qb1dg46pZYdw8AkdR0uhd9PqM6TznEQIxa1zCUxPkvJHtk9WXiqt6XhGRfgf4IGoh J2g3CVhST7Tmu0q9EUVHAEVrWKC4taBxeYGv6yE1UEA0voO37XQg3bfO7MdKS4A+H6Ch KwKYPrwyQYt+X33iE1kYPCvBqo4VmtKWKUzDYSN7iBQ3Z93YHUHeUKhK+A04Y9+WBXwy yhtgsmfh2Hmv781B5xEOdn0VknHgD45BCNAA8cKllR3ICWX7uk8H6nkJh1ZlcqzIdcE8 fUjA== X-Gm-Message-State: AOAM533adLjjxJu7jw0LYvV8DnE5RR70cfEds+LzN4cUqgRim7XDXGcs N3mTYrBD/9QUMyhTI7V7Km60s3W2no2B7w== X-Google-Smtp-Source: ABdhPJzMKF8+nkkkTUjc4u93X4mTH0+jDLKqD18ldJPdhttP50dWMbqMR7OhQ4GcmvmALtFQRQ/eRg== X-Received: by 2002:a63:6ac1:: with SMTP id f184mr8202313pgc.455.1643046470480; Mon, 24 Jan 2022 09:47:50 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:49 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fiona Trahe , John Griffin , Deepak Kumar Jain Subject: [PATCH v2 26/83] common/qat: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:22 -0800 Message-Id: <20220124174719.14417-27-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/common/qat/qat_qp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/common/qat/qat_qp.c b/drivers/common/qat/qat_qp.c index cde421eb7716..57ac8fefca3d 100644 --- a/drivers/common/qat/qat_qp.c +++ b/drivers/common/qat/qat_qp.c @@ -175,11 +175,9 @@ qat_qp_setup(struct qat_pci_device *qat_dev, create_err: if (qp) { - if (qp->op_cookie_pool) - rte_mempool_free(qp->op_cookie_pool); + rte_mempool_free(qp->op_cookie_pool); - if (qp->op_cookies) - rte_free(qp->op_cookies); + rte_free(qp->op_cookies); rte_free(qp); } @@ -329,8 +327,7 @@ qat_qp_release(enum qat_device_gen qat_dev_gen, struct qat_qp **qp_addr) for (i = 0; i < qp->nb_descriptors; i++) rte_mempool_put(qp->op_cookie_pool, qp->op_cookies[i]); - if (qp->op_cookie_pool) - rte_mempool_free(qp->op_cookie_pool); + rte_mempool_free(qp->op_cookie_pool); rte_free(qp->op_cookies); rte_free(qp); -- 2.30.2