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 19BB0A04AD; Mon, 24 Jan 2022 18:54:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 121A6429AD; Mon, 24 Jan 2022 18:48:47 +0100 (CET) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mails.dpdk.org (Postfix) with ESMTP id 858DF4285D for ; Mon, 24 Jan 2022 18:48:43 +0100 (CET) Received: by mail-pf1-f170.google.com with SMTP id x37so12717228pfh.8 for ; Mon, 24 Jan 2022 09:48:43 -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=FoY92Tvbw9/KTzBEb5Yi+2WvocRLnZaw6NxOxkmY39I=; b=EM1cqdMQ1u9gG3pjIVdUfQtMs7ZWB4TYgLbqaqx401tB1Oo6UvrH/zgizmEfhj5pmK Gn+bapTxtbjCQPvdFn5PYG/7ZsJqVCQyooRmcLyTt1MJhOyjCGOw0jkrTlpMCHVA7Cqf nsVRh8CeO5EMV/CevhghRFjFuSCeInPtm0zdkMWg0rxWQMG4A71YioKrYjiMVEgaSY6k kC+jh3Q+kBPu2v0uidQHF63/FbrtM8WFjVGbU7A2xGk4mUpthhahgHuzMH4kBALWr9n1 MfwXKw5X9FEhEJOy3Bj/t0Qv3WTjcZ+ExiTW90Ur0Y1gtXZbouDQJIt94etFubVIuMp3 D+Mg== 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=FoY92Tvbw9/KTzBEb5Yi+2WvocRLnZaw6NxOxkmY39I=; b=nbtEsb0d41fRrcerOXEPp5hdMarVB8ou6UQU0aLH7gZRrAkrBsu9K5k0c/13LC78zU tvM/iQrpMy4IXL2Q2vDgM1uELy1NdsjkQmwJUM1l0LOkD/gJYySM/MFjhJqTtRiXN8Jo dzgl0XkFlxJ342DMyQmFfEDemq04ydl8E53cAtAnRYQiQ9dHUsQQmAl1Fn4xZ0OvNWBv BR4S/1otCwTUjF+1yiludMm2jsDGCDI1d/QoFPwd/OnfkzEnbHpfUawfPxZ+NkiRlyfS EPIKiw59gfyShvPBsIuzBjuP72kv9KCxkg3UPFhdhnz5CtqN9QW5h0hE7iHTuXyK4+wh thZg== X-Gm-Message-State: AOAM530Cc6CYNTPs9QDpY7EBjJ+6hItiZPHYJVGy3cjuQl/WWXdiEuqW yEIY04fgXYSpJP7CosD6JdOC+rhgjwDjtQ== X-Google-Smtp-Source: ABdhPJyiDrl8q2VLBP/8muXenUgsi4sQSJbHLj9azLN+uiVy9OvOEQikHsHpE7hlLHpf50e3OOpE7w== X-Received: by 2002:a63:6e45:: with SMTP id j66mr5555523pgc.81.1643046522575; Mon, 24 Jan 2022 09:48:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:42 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ori Kam Subject: [PATCH v2 74/83] regex/mlx5: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:47:10 -0800 Message-Id: <20220124174719.14417-75-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/regex/mlx5/mlx5_regex.c | 3 +-- drivers/regex/mlx5/mlx5_rxp.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c index e5a12fb3cc4d..48e39f6b8844 100644 --- a/drivers/regex/mlx5/mlx5_regex.c +++ b/drivers/regex/mlx5/mlx5_regex.c @@ -127,8 +127,7 @@ mlx5_regex_dev_probe(struct mlx5_common_device *cdev) if (priv->regexdev) rte_regexdev_unregister(priv->regexdev); dev_error: - if (priv) - rte_free(priv); + rte_free(priv); return -rte_errno; } diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c index 5ead3ca341ad..99db1e4a865c 100644 --- a/drivers/regex/mlx5/mlx5_rxp.c +++ b/drivers/regex/mlx5/mlx5_rxp.c @@ -166,7 +166,6 @@ mlx5_regex_configure(struct rte_regexdev *dev, DRV_LOG(DEBUG, "Regex config without rules programming!"); return 0; configure_error: - if (priv->qps) - rte_free(priv->qps); + rte_free(priv->qps); return -rte_errno; } -- 2.30.2