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 37F6AA04A6; Mon, 24 Jan 2022 01:09:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB291428C0; Mon, 24 Jan 2022 01:06:17 +0100 (CET) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id 9B441427B9 for ; Mon, 24 Jan 2022 01:06:12 +0100 (CET) Received: by mail-pf1-f177.google.com with SMTP id i65so14225593pfc.9 for ; Sun, 23 Jan 2022 16:06:12 -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=2L9qmTqKfT2RJdIIo5A2hVCEKWtRrRPiV47crq+kj06wBS+hEtXtK/3JdloI7Y9niT 4o5zUMNGf+e5sRpig9/J8GXKNlojGqj4afF8AdMhSGpv8OrEma0O+gHMD4HXXhe9kT5I ok/WF+tMe26JHWAWsh+pirPV52w6qXvpWR01ZLBn62ZJuaYYNW8i+zS9QPrTEb8S2Kva e6ykXbKDPWdO9nelivhfdP65MCf+zCtVWc52I6AOHQ4t5Z3y2IA2bUx2Gnfuk7N2sAQ4 r6Tll6/2AbMFWAPOuoQtyWBgDhHJZfi3KmwGYZzC2XZQ0SCLpMplQtPZrWgcStxAcYjJ kZ3w== 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=ELvIgiRNQ30b4VaJyfUMvqu/FRec2v4yN5t9lA9UUADFZ3PmnFu7XeQCP+BCQs9YTz fEwzH5WrKyF98V5iU7enK+6fM3w9/L1+gp0VksBfjcrqmEVVNc2HgR93EQV5V8XoVuUo j+uu6PNGYJZPnyosA92wo7Z0raFXEtzaeQMvuMLHloYpnqRqoq8YcGaljs+zJTYBfooE narqejB1jXpxkNTdAfpL6E4wv1aXkX0ElKGbnl517XfO2Wn72m9KyGqpYKus7fXg7Si2 crhTuZwXT1KtgOQ0es3tZFL2Geu4nl31fEmKTDVeSGbJvEdzBwmax9QxctH3xzHqqzh0 iO7Q== X-Gm-Message-State: AOAM5333Xj8oI6Fi/MhQpmxUc4y4M7vaqx8eQU8MDIuPnSdtpzW1QvMQ n6+PvQ2QXEWX3LBNyCv9jiSns6sc/bsyGw== X-Google-Smtp-Source: ABdhPJwZCxO83dXy1vKAOUQ6ImNaM1jrTWT+QVF2hwtX/X1tmhSKF18+9N43TLEzm+xd+KeBcPm3aw== X-Received: by 2002:a63:8941:: with SMTP id v62mr5938231pgd.389.1642982771688; Sun, 23 Jan 2022 16:06:11 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:11 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou Subject: [PATCH 48/82] net/hinic: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:44 -0800 Message-Id: <20220124000518.319850-49-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/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