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 55560A04AD; Mon, 24 Jan 2022 18:51:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F9DF428E6; Mon, 24 Jan 2022 18:48:12 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id E410242858 for ; Mon, 24 Jan 2022 18:48:08 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id i65so16674872pfc.9 for ; Mon, 24 Jan 2022 09:48:08 -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=idSv0Xois/xOCqYAQfLwmkXZmbscIETT3rWLZhL0AOU=; b=mCODW3nn8S+H6bb+DzPnpVMGSSTLZt6038Dwq+mTJSp74iwfeMK590mr7O70FTlwMP q2xI+Y+QQBSSCDgfHBm/xIPbUduBAOdu9VOOuCPYbJvWUbOPrDhXyWa1E08JIs9luEVj IH93CBSZGKPIoR0AbmysFHl3ZEcC2+E7jIgDkv7/fPFE0UtCGjTu3MPw/oytUhVcq6VJ FX08a9rzPyzUREuOd06jwFQsD4t/Zte5e1/jnOw+zaWw6RhVBIjUUsszXVGT2bzCfz60 hOxLMQE0GXva/GGHo0xPw6S6XbYddB8gR1+TbAbH56RQPYIbNCGG2Nx9rwmRsKur6F3V pHOw== 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=idSv0Xois/xOCqYAQfLwmkXZmbscIETT3rWLZhL0AOU=; b=M4TH3RZ8T+3CRu5hrIi9LVynfX3ANBMDAY0pOA4Uixp9RLTNemspQ2xJdz6siPhPU4 Q/hWtUgOjEDFQ/bc9Xn4kDYSCZ052nAPOZQTnfLnaYaFXWlHxlB7npQECF4+7unz+hu8 JquGptuu6p4LjyXJ/TqrmsLTDMEZHMWpYMLTq7Simj1vFheB97OD1F3jCjzSj/C5cigO l5LC0ceFK50R11UxkG8FVJi4rP3mnJS9Af+Y7Ysrxa0bJqUbn+sppkT4wgZvjz5tehEp mEwqKD1BeIQjVDAb7mWIPhQwhzhVKXqGlcxqIjIbhEwCQq56fNQA/5Nk3cHZxfd8UTeD 8HVg== X-Gm-Message-State: AOAM530rfmyTG1WHufoUnTtNERjwg0l2f7ExBCBGEb8g9390hhqjvmgp 9G5VC6Uzm8WeGjbfDcsIJ5uxFMuuerNlQA== X-Google-Smtp-Source: ABdhPJxUc9P7p6daU56guXhlN+3sVgJpL9uXqN4asUxcZPDHFFvWZ9Sb+F77ZzyXezxdEdcrKPIJcg== X-Received: by 2002:a63:6f8c:: with SMTP id k134mr12592485pgc.35.1643046487631; Mon, 24 Jan 2022 09:48:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:07 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ajit Khaparde , Somnath Kotur Subject: [PATCH v2 42/83] net/bnxt: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:38 -0800 Message-Id: <20220124174719.14417-43-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/bnxt/bnxt_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index f79f33ab4e17..78339d43674d 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -5833,8 +5833,7 @@ static void bnxt_free_ctx_mem_buf(struct bnxt_ctx_mem_buf_info *ctx) if (!ctx) return; - if (ctx->va) - rte_free(ctx->va); + rte_free(ctx->va); ctx->va = NULL; ctx->dma = RTE_BAD_IOVA; -- 2.30.2