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 71360A034F; Mon, 24 Jan 2022 01:10:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF3E9428E3; Mon, 24 Jan 2022 01:06:25 +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 2F976427C8 for ; Mon, 24 Jan 2022 01:06:21 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id j16so3365548plx.4 for ; Sun, 23 Jan 2022 16:06:21 -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=7hhwjPnMALvxaQCfeixtjfBr7PvHCUrqcbBPLp2YFe4=; b=oF6ok7qz3XDZZ58NiRKXfbQdwpULoncQhGqnc087yW6/SXKL0/hR+/uJ1HAdXscRss vJvyX9eQXdw6Sg4UkOW3Id/38P3lc1QusHd9yRAlbaEXOREzA83VrztJ5aWXp+Lme7xV 4P79vv/8WjgMu+TqgwQMhSlx2QfdOelpJ2MY9wc9on/Ac2faTopYYLVfNZBB/k8Rt7Zq dyIsrHltKZHJnGiFqQfamo93kiz2soYG1U013SDljipAE5+FIq9xNAo1YOiaNW3U1n4d 4zRctfDfLyembUK7lAkGNezxFWFzbal4QPQRVDaBoRvDZ+RS1DFUTFtRpcT23a4MUM4n hDQA== 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=7hhwjPnMALvxaQCfeixtjfBr7PvHCUrqcbBPLp2YFe4=; b=lnFZWKF3vUCPtQnUqrwpeqEdasHgFF2fh0C4+QecEEzlSkRRnnyusn+DWkgR6pzuAX Qku9dxgc4dU/07rd5j2QPwaOLvAemobmF9b+mntY3+NQmQVt8nJ19EDGCHll302n6jAK 4r+szf++ODmaRBCsa7b8f89c3ZRWcM498OVok7yUg5zXDew6SQ0Dj6h9IEToybCtGanG jsaFcCySzb9EMQcaZ2hUv1TS+VMC/6Qsw5SEfHpTT+GepxmKjnu/5Wa/+NQY/9NG0ibi AXjcOJPzVO45OuR69GinXWs4XlyQYJ7RD9xILq8jJ/1ycZhAfS1JUSUp4Z3Pv91DG9St xN6w== X-Gm-Message-State: AOAM530ni2LL5arNqQiDdYpXNCv5I89Vpd71g65SMklbdeoc3td7hJe8 R2x0iwnPj5b6wiWBWMHCmX6wmi38oAdexw== X-Google-Smtp-Source: ABdhPJwynkBg8mp4OfS0uGzX5hK/UbwJ5KaEsWICIvN53sI8hajelEejXThFj7DeHuqh5j/CIg3I3g== X-Received: by 2002:a17:90b:1909:: with SMTP id mp9mr6806028pjb.53.1642982780201; Sun, 23 Jan 2022 16:06:20 -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.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:19 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH 56/82] net/mlx4: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:52 -0800 Message-Id: <20220124000518.319850-57-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/net/mlx4/mlx4_mr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/mlx4/mlx4_mr.c b/drivers/net/mlx4/mlx4_mr.c index 2274b5df1950..e95f45aa3e95 100644 --- a/drivers/net/mlx4/mlx4_mr.c +++ b/drivers/net/mlx4/mlx4_mr.c @@ -471,8 +471,7 @@ mr_free(struct mlx4_mr *mr) DEBUG("freeing MR(%p):", (void *)mr); if (mr->ibv_mr != NULL) claim_zero(mlx4_glue->dereg_mr(mr->ibv_mr)); - if (mr->ms_bmp != NULL) - rte_bitmap_free(mr->ms_bmp); + rte_bitmap_free(mr->ms_bmp); rte_free(mr); } -- 2.30.2