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 8053AA04AD; Mon, 24 Jan 2022 18:50:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C9C642891; Mon, 24 Jan 2022 18:47:56 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id 00A2142882 for ; Mon, 24 Jan 2022 18:47:53 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id b15so1756787plg.3 for ; Mon, 24 Jan 2022 09:47:53 -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=kmm3SuRBhUscTieHeGhXdEwgX22/uwwfb7UvSvwyUIK42DgjkjU4MdVBXW9sXyifm0 xE/QWFswz1RzhTNUATPRY1L2nYkxtgEg08wWN7SFxW6XjywMg9mEtXGGGGtQgJaPbO8u eqhDknLHYxihCXx/spNtJ+oWDr5J5SthygY6PV7S1MCtL+jyeBI7lgSbbX+WE4nN1QOl RQ/ceavXMo4+ddJLWaKGhgnA0Z0COcLdqS8L4N3t8c8eQRZkXEKCuSPmPzHSQw9kyvwH oGentxSw+LKLcs02Wxt2OfLSn/qqOobDANf/Myfhhlk1APVXvGGWCTpeGzdQUIPqZAX1 AveA== 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=vw7C572ml5MDv0S17OqHVV/TXIoLgq1LWVR3QAbRi9hltvaZAU/k2JQyMN0icSYlT3 Fm93yoM6hDBund/8UIRP1GDXT/ZmiiyuBO/LsFNflZSdY+xmma2vniuTpXqjD+t2eqsv RHaVQA1EPhMA3NIqbm1B9MVMNGvGEOCxMc9J/3tT9iXJmyyRb0qfC8z2l+5tN/m56Eqg g46jnnEpnpqRza6ex+Pe59waOOtcIu09SwnD1AeibsvfDrCYYJqT+ESeAuad+lCDUT29 p16Rya3rxlu0ynRh/pIiEBFppJAeUdhTo+vmW3h9Ugm5MRngNNdXPliQtbSwgAwHDqzL K/mg== X-Gm-Message-State: AOAM533lhxsclqPqe5JXQu+d/nhXBwCoe84pKSCSzU6sHIPQz0ttasSb RX88tF/MklXMRUbtdiaQV/JPIDDGks+KDw== X-Google-Smtp-Source: ABdhPJztXj8VUMRzZHVv3sCRkgC9QTN8vQ36eFSwIyTD62QgdGQrcppCAT4Qyvmk6NC/QEoIpJLHXg== X-Received: by 2002:a17:903:4101:b0:14a:cae5:48a with SMTP id r1-20020a170903410100b0014acae5048amr15404875pld.25.1643046473025; Mon, 24 Jan 2022 09:47:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:52 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ashish Gupta , Fan Zhang Subject: [PATCH v2 28/83] compress/octeontx: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:24 -0800 Message-Id: <20220124174719.14417-29-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/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