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 08700A034F; Mon, 24 Jan 2022 01:10:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C76334287C; Mon, 24 Jan 2022 01:06:24 +0100 (CET) Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by mails.dpdk.org (Postfix) with ESMTP id 2623F428C7 for ; Mon, 24 Jan 2022 01:06:20 +0100 (CET) Received: by mail-pl1-f176.google.com with SMTP id u11so13912470plh.13 for ; Sun, 23 Jan 2022 16:06:20 -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=8uCh2fmiVJ0Fv7CxbxcyCYgCxrp8a63KW8vHU+YPmcU=; b=3dryniEWDqdUVLWYzIAKOoYfcL6UWtPzYEAYIRgZn5y+vKHtCaNYPJLDz5ktbh+T6G ytx2/LGgzProohbDYeXKHAc0ousMPUfAkS5FabcFKTwEpBHD/v0GNkdVWyhkURsSoXNQ rIjth8QiZdocipikZ+gmgtFooIz37YXMkOCVinEt2zBnUtpr452z4Hm0VEDQy21MVl7R Y43XuoUSSte2PmmZGaf9G+vMYxV75OVpvLfksT5ZRRbc9b+EcmMgI4nVXBD/4zrkjE+g DJvMd+fPkpI5htvON/CghZV9emlOh/IPPWj42+sbrSknTZuZEvzg49600V1KYfmoSNfs 1isQ== 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=8uCh2fmiVJ0Fv7CxbxcyCYgCxrp8a63KW8vHU+YPmcU=; b=XE0DQHmdOGnZbqP1w1oaGLDTpSeEqb/5oEACaNM0+49cD0NDmJzRTG8O4av/v1ZjJX 9ebN0pyeDhMfyHfDm9skNqDr/B/0G3k4UUoESEuWLesd08bsqrhABx11ZGcwQVxIbfOB pW7dwFwNT5Aea99cz/Edj1qYGVApfM5aeQA/dxdm2kG69PcSsySJTD8e8FsNyoC815lg TbB89QP9BnkCxD+rBwRuFbFiBeKDorJ8dDBfcHtcSd+eQdVCzl27pnaDtRt70wdKJMB0 aabNLamUc2pCPjdT4bU6wS3S3P5ZYm52duijlLWoEjzpQ4IbtADeMipZZIlu7tNw+oZr SUVA== X-Gm-Message-State: AOAM533+HUIN1Y8ylLFJZ9n4TsNJVaxh2dH9W987z2zdlCtRN110T6la 166/9UZEnSHezzFyiL0toH9RY9Sgf2Eaog== X-Google-Smtp-Source: ABdhPJzkYyLEDFFgBag3nHogN58Jm1et2ndY+2Vx8l+9jKnGCayU+kTgrSJ2D4hwiW9CLAtIpw/leQ== X-Received: by 2002:a17:90a:a90:: with SMTP id 16mr10506179pjw.125.1642982779143; Sun, 23 Jan 2022 16:06:19 -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.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:18 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jakub Grajciar Subject: [PATCH 55/82] net/memif: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:51 -0800 Message-Id: <20220124000518.319850-56-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/memif/rte_eth_memif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c index 59cb5a82a23f..5c2203f5270b 100644 --- a/drivers/net/memif/rte_eth_memif.c +++ b/drivers/net/memif/rte_eth_memif.c @@ -1731,8 +1731,7 @@ memif_check_socket_filename(const char *filename) ret = -EINVAL; } - if (dir != NULL) - rte_free(dir); + rte_free(dir); return ret; } @@ -1903,8 +1902,7 @@ rte_pmd_memif_probe(struct rte_vdev_device *vdev) log2_ring_size, pkt_buffer_size, secret, ether_addr); exit: - if (kvlist != NULL) - rte_kvargs_free(kvlist); + rte_kvargs_free(kvlist); return ret; } -- 2.30.2