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 01BDCA04AD; Mon, 24 Jan 2022 18:52:35 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA71142948; Mon, 24 Jan 2022 18:48:27 +0100 (CET) Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) by mails.dpdk.org (Postfix) with ESMTP id 1E2C642937 for ; Mon, 24 Jan 2022 18:48:25 +0100 (CET) Received: by mail-pl1-f182.google.com with SMTP id t18so16301228plg.9 for ; Mon, 24 Jan 2022 09:48:25 -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=HmC5NdotHUYnSgYfeoqlnM4fgFAgXDyYrZ6okjMfPQoby75sSGV8fOiqpk2QfR7lEv MmxTXjP88qGMSrJSEqlQ5PeBWjXKHYvT06euWD0kj4YVIX4Wl6OQNVJq3XWwOza6EPlB 7uRGlw/hzMfI7xiALinViyGZd3bQGrXrPVfZcXTbHq2z+ygsBH6YVEj9DsxHB+t4FS52 5hjNLeENrnTq808GN0/HhD7ypxQ6tiwndcncZpHugF1kzZKsGiS/MmVTl19AH1Ebu2Xn 2wtx5cBIKa1BARmwQGcL59GrKVo49wfoq9VIrlQADJE/r71w/D2LUVCybusBaNDnKMwz IrdA== 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=gc7/iChi9yIOb/JkvMDI7AzxgNw0onGHwlQG3YhBBbTbdd8LsPjLpmy3nzCcrT5Frz l3oEPzPVXR/2lQ6LC3L7VhNdDGaBNP87Jwv0TMKWiZQXnJ4Z8KLxsXfn3DfnQzdIMxCL i1EqTv/tIqIMHCiu7x0B3PFtSOu/h/Yys1xydHyz0toKKCpTPhtcU42xBvaEWRewtM1U FDHpgvMsuWc6tfTeBV4IotfIt5ItAh4TbYAUiQ+7Xp7wKyW/boV+ULN8l+b5+VrXG0rY nv3UE5K+xMSgw1bIhtFc1DxYxjggmLfOJITriRAXEF6Wz5iNbyPUOkUL59SnIuS9PYrZ IG2w== X-Gm-Message-State: AOAM530vMwABResGiBtL9u5igbLYaSLL2/5pV52XXgu4DxhW5Xts3RqM MXnLffUys+o7zKgLRESzhzmEyUOl4TZ07Q== X-Google-Smtp-Source: ABdhPJx1X1kp/JVxPOpia/cymB6S/6O6f+6HtBjPIYl+rRPyop/fdtt7yCMMZpGBtJPzqDfxCXhBbw== X-Received: by 2002:a17:902:9893:b0:14b:4d5e:de0c with SMTP id s19-20020a170902989300b0014b4d5ede0cmr5799194plp.117.1643046504110; Mon, 24 Jan 2022 09:48:24 -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.48.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:23 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Matan Azrad , Viacheslav Ovsiienko Subject: [PATCH v2 57/83] net/mlx4: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:53 -0800 Message-Id: <20220124174719.14417-58-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/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