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 0CA87A034E; Wed, 9 Feb 2022 20:20:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 07ADF426EA; Wed, 9 Feb 2022 20:18:19 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id A235441C27 for ; Wed, 9 Feb 2022 20:18:16 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id k17so3120271plk.0 for ; Wed, 09 Feb 2022 11:18: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=BLG7siBhbPxXn+rkP3L0UYoK5v/HpuIRmKC/QDdJXX8=; b=lQrih/ri9mr/hSnpNhJVhP7eA059HWawkIKqtWZgiEZx3yZHcAlHtNDQXW4YnzRg98 TN+S0suB46SnJhXo+5nKNUeTQIa0lIaOlBAuyinSCszZ1uNRhILIW4yrMqRcJwxgz/fK 5oDHemVy0iT0bweKzBeS13tZAevECrmWEPGhTvcHakV/5nRG6kv8A8wH5gzEaUXYRlE5 aJjTnHeghcbchxsOLWwQovgcUfmre40JFlcc2UqihApy+y/bRefs3lfz+D0vJshbPAqo xj+74xRsv/ubBeN+Dknh1G90VuZV2m998Wp7NI/OQD3eizRTv9dUz5bpd595CMGazmSZ 2viw== 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=BLG7siBhbPxXn+rkP3L0UYoK5v/HpuIRmKC/QDdJXX8=; b=KfQUnlhFJpcA119IgjPpA6aKO7luLi4prRdTC+Jc8w2KzIgm17/k7SVnxK/89xVJOM xsAPKM7ElftMOZCZfy3eo7ip3fUg4PvKLR12f86baB/Za/Apxx9XZGCKvnhAoI/tof+T mtQ2BBmoKSlxz3ngGp/DNW787r7OTBr36GlTSMtD7aVY8v2R8S5V7GavevfVLalbbnzu YUePFgcpgKVrnCgfJvN+z/HKSnK91qbAxQmTGLIiIvthjrISB0nhzhbxI6Ef6dhoU1wG PPPJPn5MiLlm+1JlYVk6ES21hYVlKGCUqwEvJo9JPb6IUSKXw0yC3MyBMctIXhv0q8Eu PYWg== X-Gm-Message-State: AOAM530rWHY2LwlxNze5a+W6mnaL8lKAHyiKh0jikO60BQ7rkHUMF0dq b+CyBowskBEV3kWdC85RDDsSk26UdT+5K1xdw24= X-Google-Smtp-Source: ABdhPJzMh76T1KlPfhphjzcmTzRiBv6i00kDFdMjxdYb0YgJNT8bbgJXUKUr1nfhJhz0H+AQ4K7t4Q== X-Received: by 2002:a17:903:249:: with SMTP id j9mr3494335plh.39.1644434295551; Wed, 09 Feb 2022 11:18:15 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id u16sm14378401pgh.54.2022.02.09.11.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:14 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ziyang Xuan , Xiaoyun Wang , Guoyang Zhou Subject: [PATCH v3 20/36] net/hinic: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:32 -0800 Message-Id: <20220209191748.377729-21-stephen@networkplumber.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209191748.377729-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220209191748.377729-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.34.1