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 6DEA4A04A6; Mon, 24 Jan 2022 01:11:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 377DF42922; Mon, 24 Jan 2022 01:06:37 +0100 (CET) Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mails.dpdk.org (Postfix) with ESMTP id 8511742907 for ; Mon, 24 Jan 2022 01:06:32 +0100 (CET) Received: by mail-pf1-f182.google.com with SMTP id x37so10266799pfh.8 for ; Sun, 23 Jan 2022 16:06:32 -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=JoXl9Uk1M4K/Z8qQv8SBHuUcSVhoJbVr0MBB/3TJed4=; b=YCLkZviYnaiiFihgMfaUySPerMN98zMPCw5ZG4jjPB4XsrJLuTbbgRMVjtguOKO575 txr2etIPBVhRUEvPX/+Ybh0CoGZ2qICdEXGwtnm+nR20tlH3Ms7qL1aAkN/iiLHyjwPV jrOgDtm818V7XKcmmgVJ1jY+cYzHTFF5ZZ5/WCF4E8ixNKvq/cb6JuVJ3ifk1NIKP6vt ro3Ov9bZgBYXNc8IL/hXJcboMWpH/rRDgxmAqKKQUUwHEUveoqIbSZmxyLxCS3IdEZYq jamZzVqzgu06NNNfzVJti76Yi9zOpiFEsXTwFiYT0D/92xh3lyn8PpLznMmF5t4zwVBg ND+A== 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=JoXl9Uk1M4K/Z8qQv8SBHuUcSVhoJbVr0MBB/3TJed4=; b=8QRlPmV4OecsWXM96Io0kygIq0tVTeiQOu5nnJE6utWTWjnvz5YQcXgxnPKNiXrpCU Ak2mEF32nAVRkwZqIts1zpUCA4MR+cwf1EgPQx7mMRABvxBZfs5nPQFzhwCfSSt6d8ww pqA1hFhRLAGMErQmGjmDz/4vorDdc2gXrBUfo9/Ffrc/2D9c3QbEomppUnuqzCx0jez4 YIdcR+ByZMzJcR27UpYEZi64yuQWgQ9DDBBzwHN6eXhEItw6ptMqZIGt3DgMvVTQag++ RQl7ZmY0YXJXdabDRAjo4XfLG1mZOyLFiWR2jfcoBZbjsOq6Bqj7uxNBho7f7M2ajmBS jQcg== X-Gm-Message-State: AOAM530gPcqz1wGxnolM9krAVWkKB6Ivp3mm1zRvmkHuqyKaBjZ4E1i9 CkSPmyqcRPTccaEBJtcjX4l4EoH6ID3xxA== X-Google-Smtp-Source: ABdhPJyimOWzQNjotahbxiMgZEPN55iVPNwqfa4AHgfQLmoolrkApI5mdPaGsb14qqgSnen1DWkIQg== X-Received: by 2002:a65:6093:: with SMTP id t19mr9968621pgu.566.1642982791552; Sun, 23 Jan 2022 16:06:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:31 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Maxime Coquelin , Chenbo Xia Subject: [PATCH 67/82] net/virtio: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:03 -0800 Message-Id: <20220124000518.319850-68-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/virtio/virtio_user_ethdev.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 0271098f0da0..f6288fd0c492 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -688,14 +688,10 @@ virtio_user_pmd_probe(struct rte_vdev_device *vdev) ret = 0; end: - if (kvlist) - rte_kvargs_free(kvlist); - if (path) - free(path); - if (mac_addr) - free(mac_addr); - if (ifname) - free(ifname); + rte_kvargs_free(kvlist); + free(path); + free(mac_addr); + free(ifname); return ret; } -- 2.30.2