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 3DCF4A034E; Wed, 9 Feb 2022 20:19:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C7AC4122E; Wed, 9 Feb 2022 20:18:10 +0100 (CET) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 51D12411E6 for ; Wed, 9 Feb 2022 20:18:08 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id n23so6030826pfo.1 for ; Wed, 09 Feb 2022 11:18:08 -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=o7/Q3EuJuZQb3ktSVHd5u7F//eby0eL1M18mwxb7rcM=; b=0mjiX437PmxZeIg57M0NQsRPw5VmYRoDVmZjnFYVwtETNOUib6laHRPq/Gid8HypzF UwHb0DIylwxXRU9EIH5V+oWOJpELQafiG5C2/YMsxq1ULZfwGnZ7vx2Ziuq6t1qWiJVT jYp01MqrgmAXqCzWYjG0A/H2mvQjgudMOsn9RmQmRZAReUI6t1lXgtAX5eLxzgmbGwcX 7dR9tBIjbuD4iUBaBgF2UYBJDBbCslLZbMXm5nDcVcfQhoBKCJLGG0bLHH3kUxQfC0ZG FiEcpEpxtEeorAqe6eOIY1ca9aOUwlW2xpMC+bHJ1xhiNh2N1LLWae/yjJAiU64xBtrJ KUwA== 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=o7/Q3EuJuZQb3ktSVHd5u7F//eby0eL1M18mwxb7rcM=; b=yeBJL4rzmLEdvCl8hf++8WeIYhe+TKJv7yXK5DjjryHAfJv67M7IevJ4FPkWYNj3pD goGXzleGponeDPW6nyzGtZByPyXaVA8HhzEM8poWA63Z4UvzZA1G6VSrsvctrKbV3kOd A1Yf7s6WIRrgGxV90CjbsCQncDSOdmdVU+chkibbEiea0OE9sDuRaGx9mAW/7bHNhri/ SjxDav8tUYOO3UPl2fwG6dxYRb8qz2JGaRTv1OAxpd9a/7hG0GBnxjooNPUZxFvRluwZ eBg6cG23b11dMAyjt+7Dt7q0AfpK2FWIRd0P5bRX7CMObeGzjuyeD0TR6AAdzJInheKK 7FfA== X-Gm-Message-State: AOAM530kKqAeGS9bRFzZZPKI6/YEEpQd+qqk1eRBoLvtQXieNGnL/KqH qlgW3FKCf2cWD39K9hX7r5HZlxyNhqUGyDVQ X-Google-Smtp-Source: ABdhPJzexVckbAD+04kYND4oSQ3FcaQxLum70MxFYjbF3h0O9Jdtg0O3jniSDD6pIfrDf4MFrENd1A== X-Received: by 2002:a65:6659:: with SMTP id z25mr3057305pgv.367.1644434287272; Wed, 09 Feb 2022 11:18:07 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 11:18:06 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harry van Haaren Subject: [PATCH v3 13/36] event/sw: remove unnecessary NULL checks Date: Wed, 9 Feb 2022 11:17:25 -0800 Message-Id: <20220209191748.377729-14-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/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.34.1