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 F3AC4A04AD; Mon, 24 Jan 2022 18:50:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 373C64288E; Mon, 24 Jan 2022 18:47:55 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 1A32042848 for ; Mon, 24 Jan 2022 18:47:53 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id e16so6720934pgn.4 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=SVEXLdTcsVppg5dFgNaFR63Y9RESnOdSyfFIOefb5jw=; b=Zr0plRoNHV48AcQ31WIM6XsOu3rw38ta0xgmMOnb4WW3CN2c/7bDIkYxuOB1HK4ki7 WBdrxnrEpmJCtT5fMgq861DzrHTmwmOW8mZzB1d9tMupGMKwP67NPzPaI2lD0rwe5iLB z4VwaWk2WgXEfWgzQ884OIjnaFgG9cjpWXn3BepT9b3ld0+h1By0o7++owGSLSbMy34R pvMYWCuziF02aJzT5hCgrsoUEef4wnEV/N6CPcXUG6j3FNt1ksPrhFNKR6jfYQKoHn6h kM2No52z2jLsq/dkhzzbnmiuIvHHJASD6fXXxpvivEEXVdVGQoIVd+lPY7cGqRPhKxX2 bJIg== 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=SVEXLdTcsVppg5dFgNaFR63Y9RESnOdSyfFIOefb5jw=; b=GdOOxTrk9GGHWY4LAHuSM4pYzcJ4oIuRe1OvgFMlrnB97bROuDO/welmZoJYzRwMzV V19lmsvvYl0fFHdwY1dd+UxjwrhsL769WG6UCTSH+QGBqEBt03qWPTrtqm/lQEcMivLb gWbj4DabS4BhJ/IaK17OXD9NhpxjBWEHtVF0cM+Z9TH0wGe+t6jx/zpzuxXAHe7kS771 MUhHJZDnykA6BDuqN+iJbGfivtIHBndNW3159mnjF0x7bkUap0gmvdmnYBdvu+KRD0M5 3W931M2D1gzzuAQFnzvxMXobQnvkcGcpJ5cuMfrTveVsdl7bvch8QzKILZ1yJ1UsO22K FYrw== X-Gm-Message-State: AOAM533Tsz8VkSb4O4Ym0DI8PYYf92psZfAQANHTXGcOaHZCFUAMPtaM HMLEK77cImfs5H3Dr8T+AdmpFgOTyyc0zQ== X-Google-Smtp-Source: ABdhPJx4TyPu/gMc9HOuyTC+oLra+hMkKvYFzBb4RE4/cXJ/S8T5ySwLu0UNKV8v0wWFW9IdrTM1mA== X-Received: by 2002:a63:7202:: with SMTP id n2mr12713751pgc.254.1643046472035; Mon, 24 Jan 2022 09:47:52 -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.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:51 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Fan Zhang , Ashish Gupta Subject: [PATCH v2 27/83] compress/mlx5: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:23 -0800 Message-Id: <20220124174719.14417-28-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/mlx5/mlx5_compress.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c index 82b871bd860a..b12951da8b51 100644 --- a/drivers/compress/mlx5/mlx5_compress.c +++ b/drivers/compress/mlx5/mlx5_compress.c @@ -146,8 +146,7 @@ mlx5_compress_qp_release(struct rte_compressdev *dev, uint16_t qp_id) void *opaq = qp->opaque_mr.addr; mlx5_common_verbs_dereg_mr(&qp->opaque_mr); - if (opaq != NULL) - rte_free(opaq); + rte_free(opaq); } mlx5_mr_btree_free(&qp->mr_ctrl.cache_bh); rte_free(qp); -- 2.30.2