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 51615A04A6; Mon, 24 Jan 2022 01:07:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 639294284C; Mon, 24 Jan 2022 01:05:54 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id D5CB64283B for ; Mon, 24 Jan 2022 01:05:50 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id c9so13906492plg.11 for ; Sun, 23 Jan 2022 16:05:50 -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=XzlxU2voULKxhb3UlVmpeThkHqlmJu0fxudZRiVGg9k=; b=iz14jQuw0SNYm/amAoZomoYo+ZEnbfbXp+uo/C5uo3VNP2R9GnSYnThaSh/hOBoWwC xALvLb7/w+ladNJDnHj/0SJ4Gdx7K5MqrQ7HBvsvrzNutR6iZyXb3gwP6vNXVhvRnVPk uUeomvkPl0wxueidSQxH59WlwPpagxDHevFUxuE0vWupCcLLz4FzSGNzuUb3P+1wnSCe Rx+ahAkpaVLuGcI/W151oMOcvHBXutrMrBykywK8FAKe5aly6a7gMry1DbZwWHUDQbJt Wunx8oP7JAnBD22L9Cd98gUswzJgtAJCMXxPnYEhE2/B5WUptsyHCfQWN2HgIyis5Z22 dQXA== 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=XzlxU2voULKxhb3UlVmpeThkHqlmJu0fxudZRiVGg9k=; b=wraxN0Ch3QtSLenNRNz1L2TR1iygqgUBkm05YzQ2OjAOjWONgJAqJdIOnpfZm3WZuk XF2nwgLwjjXj2DCP0UUYIvszBR8kPT+vuMOUWmv61hIT9ZgMQmsVlDSWKoXRRAg0BHnX 1PtXZ/RozQHVdx2ZtSV5cNpirkq73CW7PHGi3enL8Iqij7Al1yFtN3E/HZYslQYnSjEq 4JP+Rz8gqnKaevapDUiRUGBgDyr4CLdR1Y13qfNSGpCqrcZROnJoSr62eL6s3z6iOiBM iOlMPdsV1eugMcYPkV5Q5sJxSFzMMLDzcUzxsrsfgddhULozvnB2T92BRPmumO3Wf5Y2 zQOw== X-Gm-Message-State: AOAM5318mT+/Fm3YjqarXygSEoKBrngTzL3GCvpPVDAHMU0l6bvY9F95 Xc9fU0AERFw0j7PUF9nkLic+sqWfRgtdDQ== X-Google-Smtp-Source: ABdhPJw0UhckkZwEeEVLLORXcIRaDnmVkAAakmBVG0VXUhsbVPqq4/PAZaCDrC2Mi3A2WS+Zs9YcQA== X-Received: by 2002:a17:902:7681:b0:149:bb15:c53f with SMTP id m1-20020a170902768100b00149bb15c53fmr12421754pll.159.1642982749895; Sun, 23 Jan 2022 16:05:49 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:49 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ashish Gupta , Fan Zhang Subject: [PATCH 27/82] compress/octeontx: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:23 -0800 Message-Id: <20220124000518.319850-28-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/compress/octeontx/otx_zip_pmd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/compress/octeontx/otx_zip_pmd.c b/drivers/compress/octeontx/otx_zip_pmd.c index dd62285b863e..26cdce60a859 100644 --- a/drivers/compress/octeontx/otx_zip_pmd.c +++ b/drivers/compress/octeontx/otx_zip_pmd.c @@ -337,8 +337,7 @@ zip_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id) if (qp != NULL) { zipvf_q_term(qp); - if (qp->processed_pkts) - rte_ring_free(qp->processed_pkts); + rte_ring_free(qp->processed_pkts); rte_free(qp); dev->data->queue_pairs[qp_id] = NULL; @@ -423,10 +422,8 @@ zip_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id, return 0; qp_setup_cleanup: - if (qp->processed_pkts) - rte_ring_free(qp->processed_pkts); - if (qp) - rte_free(qp); + rte_ring_free(qp->processed_pkts); + rte_free(qp); return -1; } -- 2.30.2