From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 26457A04A6;
	Mon, 24 Jan 2022 01:08:56 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 8FCDE42892;
	Mon, 24 Jan 2022 01:06:05 +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 0B6FD42879
 for <dev@dpdk.org>; Mon, 24 Jan 2022 01:06:02 +0100 (CET)
Received: by mail-pl1-f180.google.com with SMTP id u11so13912054plh.13
 for <dev@dpdk.org>; Sun, 23 Jan 2022 16:06:01 -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=b9RGmpF2C2wCCBfC5oLCxPoLV/E07bsYUzvcP+VGLAU=;
 b=outJIQzehyVGsUcxsnDMPZpoBIYFmRWhqXy6Y1+Kcuwc9zaCrBnr9B4w7yzrIj+KCx
 tV8HIjaZkx9EXxykZcKNyD1DY7C0EpJQ9rSvF7uzBiPu19mopnuPM65xM1TDhRA+BSFm
 7TMyv21bf4WfeYFTu+DvXdpRqVVb5UTRNI+dYTd7yg2g806MEvbpAE0CxUlZrMtY4yxT
 aKkonSwpO1du2CV0RM9a1LIF0LBsRxNWYuj6QureG3geMGlkwdMyciFHa7LalksKyguZ
 pf7F7FA3qApOPOCM9j/vOIXzlUUo9wAza71gzyyp5sQ1CmMYDD1vPmLpsQ3UmL4gHpim
 JX9A==
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=b9RGmpF2C2wCCBfC5oLCxPoLV/E07bsYUzvcP+VGLAU=;
 b=0PDnZ5JLtDSfTTpqPlE3IHnbLFwsL8Liba9MxBEfwtKPTYo4LxyU0TC0C5RrE6pZlJ
 YQUW+AUYOEYtB+EKqdP0Ijdg7ii9ieaVe3t7ggkEWNnxAPi41PUkiOq1Sr9tMXu5beg6
 9cfW+1N/aNLVpfPBHih4IrTgHzIGeiogQCEPCHnepT1grtWkEpJhEy3N+F+VWLncVHx0
 0v7Ec+jrSyy4wjdqSwBeu0goKZsOHFWjSqtdcWSb/ffDFRFAb+w265RsnZRtLDwk1PCb
 ioSmJi5MKMfx/SXtrKAQ6Nb21lb1A+oU7X6R/s+8mN2kopSP/AqncsBBqvfjCRUK3Ei/
 Ouhg==
X-Gm-Message-State: AOAM531JvTB2CGzf56M41c7PJ91Hk6fi6bMLC+F9z0Wz342ZuRhFmuJh
 +Ao3lbytcb0dMfzAN1jGi9VXQJyaxnwB8A==
X-Google-Smtp-Source: ABdhPJzxr/2d4Zl8MqBDr6iWf2K/ZoEYltkBrNfFDnvx+Kmjf2xa57XkTjjLk/DKJ6F7D9aRxJeSlw==
X-Received: by 2002:a17:90b:30c9:: with SMTP id
 hi9mr10513349pjb.68.1642982761054; 
 Sun, 23 Jan 2022 16:06:01 -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.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 23 Jan 2022 16:06:00 -0800 (PST)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Harry van Haaren <harry.van.haaren@intel.com>
Subject: [PATCH 38/82] event/sw: remove unnecessary NULL checks
Date: Sun, 23 Jan 2022 16:04:34 -0800
Message-Id: <20220124000518.319850-39-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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Remove redundant NULL pointer checks before free functions
found by nullfree.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/event/sw/sw_evdev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/event/sw/sw_evdev.c b/drivers/event/sw/sw_evdev.c
index 6ae613e0f2e7..ba82a80385b6 100644
--- a/drivers/event/sw/sw_evdev.c
+++ b/drivers/event/sw/sw_evdev.c
@@ -526,8 +526,7 @@ sw_dev_configure(const struct rte_eventdev *dev)
 	 * IQ chunk references were cleaned out of the QIDs in sw_stop(), and
 	 * will be reinitialized in sw_start().
 	 */
-	if (sw->chunks)
-		rte_free(sw->chunks);
+	rte_free(sw->chunks);
 
 	sw->chunks = rte_malloc_socket(NULL,
 				       sizeof(struct sw_queue_chunk) *
-- 
2.30.2