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 10153A04AD; Mon, 24 Jan 2022 18:51:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 168FC42858; Mon, 24 Jan 2022 18:48:09 +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 1AB2C428BB for ; Mon, 24 Jan 2022 18:48:05 +0100 (CET) Received: by mail-pf1-f178.google.com with SMTP id p37so16669776pfh.4 for ; Mon, 24 Jan 2022 09:48:05 -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=vujCj8mQQgKBezT49sdEjMQaV35XPiiMG/HaUVQrMZgWkRXWGv2+1jxxnTYzL0fFVR OMtVFShimaCk667I7rhhUrg4EgrejTK32unhLoy83UqjTinoRHm3oA2WxGtLDmkD90zu /00qKorO0AZoPwJvO5oQcF+7HzPRCBMinDpGcrTQaAtyXJBbJSsyzqkUXApcWZtBTmiN OVrxOkZ2fwY6AyBycJg8shNcwedjcisZirVytgJzuNeBbiDO1Sou0+JUKC55PtJVS2f/ 65evky5/Xry2c/m3Sqlxmwqkws0/gHneITwxG8VkvHHPp4m1PX1f8xvOpn92vQhZH8N3 1ELQ== 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=3nq96bXG8pZU0dcuLsb9TLXqWVVcLM2NS+heAX+o8j+ic+Yeyqi4BHDTc6NxIAgUQJ 6OZ8IsXskd0iHihbPq54FM89d75rj0JYIFlPDuH1NoGMA0Ie0CSmr2/0/Cqp7pGd4UCw V8tU4+ceWpxx3syrMkDaux3AhlUZ+T2kT30W/X2CqAScKo2+HtDgZpOOIYySgpO4GkK0 uEmx4uXgicKwHS+hHgH/a6jrBb8IrIp73kARxRHCBX2JrazV4FNY3+DXu3Ujmti/CeTR clPt9eOGK+qo6RAbwDt8seeS57lcUZPHXvtdn3ndYh5t9dxVp90gkjhi70Pp/aakVKlD R/1A== X-Gm-Message-State: AOAM533ZZJ6Mao5JJSXhR0ItlJ5cVFlOE1jDJBTkA5UYBuxIFeOBXE2z ENmwCNinRvpHKyF5ZSu8C7vbcr+jdiy8jw== X-Google-Smtp-Source: ABdhPJzH6TyqicpJl3VXa8MFWTYfu//crcI/Wc+ZtIkd8hr9tsNEPaKuRKhxrTHO3kSxICYptGEgBQ== X-Received: by 2002:a05:6a00:2310:b0:4c3:d3e:3667 with SMTP id h16-20020a056a00231000b004c30d3e3667mr15190721pfh.69.1643046483879; Mon, 24 Jan 2022 09:48:03 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id q7sm15835082pfs.37.2022.01.24.09.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:03 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Harry van Haaren Subject: [PATCH v2 39/83] event/sw: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:35 -0800 Message-Id: <20220124174719.14417-40-stephen@networkplumber.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220124174719.14417-1-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-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.30.2