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 DFBE8A04A6; Mon, 24 Jan 2022 01:07:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9D0942840; Mon, 24 Jan 2022 01:05:51 +0100 (CET) Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) by mails.dpdk.org (Postfix) with ESMTP id B82CE427B3 for ; Mon, 24 Jan 2022 01:05:48 +0100 (CET) Received: by mail-pg1-f179.google.com with SMTP id 187so13438788pga.10 for ; Sun, 23 Jan 2022 16:05:48 -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=pIuWqsDy9M2R+/ybwxSazMQsQVg3/qI/Hl3r37/eWzxEyUfat81qsocbcRO+rkUKRE C0hYs+a8K8+SVXCrxRLl+aFLioUo25z0jDLA/XNcLbNYnhrmet/sntOBlq5pNsjQ4b8b y/8j73M2wTpFHW30Qr4K7zRB4nc1YQ8yt0BR5G5kWDj4t3BaKKQFyWT40NB5ovWqNAp5 RzRd4suvwomsU/3G0RZjj40E2l3L/bnU4+JPK2FnOBC5Vfw6xp7Dki+isdTwfB94QOXg b3fUI/pfp/0u02vpGqdnh7eHBuHMw9J6wa8wxoDTVFlmNZq2+4z3ptnUOzHFWVEE7I3G VPRQ== 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=rof3IYLN2n+2FeTEBdyrdDJPPnwWOmn+J4Qdk6q23T2dqb35uOJY4dwv0p9wWsoIRi /PX3WYaZO2IkSNaAsvRYEhW2cahSfJz8QQnckvxHM5vkf9OL7V7KAmRu51Ru9cQXC+2w F/caBNcOFEQhFyaneWbLG8djJ+8C3lYqdstIftGeBXO3NQ67a1JUDzZOyml/S+2CBX0f iBc1YTzAkMYwhfwzXf7TStrXjPdybCeyE7vO2ObEtMQ4aztdwJDGZJVE4TlnXw51hbb9 27omIh/ydcTU8uO0TglO2wAQhbvRU3TtvpuFtxQ0HCkEjycE55vvEJx4ywHDT2uvCE1Y OEnQ== X-Gm-Message-State: AOAM530E1n4JH2ZdSD9lyup6A5JeUq+qOYwmdrz3Pn/p95iZvYYsJGX6 Afk6IaSDkotxQ6yMWb+HYsmJhkCSqvBpHw== X-Google-Smtp-Source: ABdhPJx209WawBLcw2JNxJQLnKfkIiTwXIMs5WyZeuD1KOBLfZjo5R8YNCQ3KH8YPHRoJ12PVdX7Ig== X-Received: by 2002:a63:204a:: with SMTP id r10mr9981199pgm.502.1642982747790; Sun, 23 Jan 2022 16:05:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:47 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , John Griffin , Fiona Trahe , Deepak Kumar Jain Subject: [PATCH 25/82] common/qat: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:21 -0800 Message-Id: <20220124000518.319850-26-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/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