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 92B79A04AD; Mon, 24 Jan 2022 18:51:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9E17E42915; Mon, 24 Jan 2022 18:48:19 +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 25CD8428FD for ; Mon, 24 Jan 2022 18:48:16 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id 192so13240556pfz.3 for ; Mon, 24 Jan 2022 09:48:16 -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=PtGwKFlFN1UZntsSRkxw8yKwwbyOM2mNPtc3IrzMgQk=; b=GWYtmGvr8I+eFupl/ZJm3Js05nDhy+J8NDGtH4hdYaDHlFZHEtJx0Ygir6omvMwQNZ 7Xfnea8r5j7mxowg8H6DLYxbNJXPJRljZ9Xb12fGN+C9+JKhs3CEHnigQGwUEsQXTnDE X+QapG1qfnwlR4SmUApe9siD18x5o6ZvldQclswnr3Pwpt8QOVFNP4iEMZG1+E4F7ByO XwCmOMtZb8SbhOWcpb9vN5l0CZaUHeoVB46KSchaPPuY9PZrvm9z4BD7vYoCnacaruOg ZLL9pmiVkYxLHGi8YCrIt/kLBVIlJDVcmnyuC4K+TGRiRNd/sCB6YZX394PDb2eiqCEo fuIA== 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=PtGwKFlFN1UZntsSRkxw8yKwwbyOM2mNPtc3IrzMgQk=; b=fZWG1MUa3ojOU0A9gNPpHwPSvAP4sYb40YQxGF69W2zjZZH9vOUKVmjwkXe1YoqmDE iiInjNZLR0OsTZiXp7JR2CObeKBSVttDItQgrGI5hKtkqF/nbl2yv6feM8JsRtQkncLQ f6doo2lFAfCV32QhYA6MLAdv0RcJXTPm7sXS8QOgyW12Vy0U6AWtz8a6YREuQjuBovXQ OO1kExJJYKuk1CjsX5GMCTOGspuVXrf+AbI5ophBD6nytxZp6Ge7fiinwTkGn1c4aZUe 3Qbzg2vpf+MkYMcWqW3bTIX2qlKwIOrHWyLFZSLMN9dFzt18587uaMtX2ewLrDKw0qS+ 8F5Q== X-Gm-Message-State: AOAM5322oHhfYsdNNm9mBPU5ZzOUOfVE4wYxjatZ4QSPYE9Rs4fgC8Iz ysKrcC5Gw3hL0E3H42EtB6I9HV7UiXRczA== X-Google-Smtp-Source: ABdhPJzDgWIuArd3tT3yl+UHBg0ZIvK+LLGytpDKFZYXsXZAO7JGBc+j0ar1PK00jIiVKa3M49rnAQ== X-Received: by 2002:a63:a745:: with SMTP id w5mr12476659pgo.374.1643046495126; Mon, 24 Jan 2022 09:48:15 -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.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou Subject: [PATCH v2 49/83] net/hinic: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:45 -0800 Message-Id: <20220124174719.14417-50-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/hinic/hinic_pmd_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c index e8d9aaba84a6..35788f46eb4c 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.c +++ b/drivers/net/hinic/hinic_pmd_ethdev.c @@ -2662,8 +2662,7 @@ static int hinic_copy_mempool_init(struct hinic_nic_dev *nic_dev) static void hinic_copy_mempool_uninit(struct hinic_nic_dev *nic_dev) { - if (nic_dev->cpy_mpool != NULL) - rte_mempool_free(nic_dev->cpy_mpool); + rte_mempool_free(nic_dev->cpy_mpool); } static int hinic_init_sw_rxtxqs(struct hinic_nic_dev *nic_dev) -- 2.30.2