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 30862A04A6; Mon, 24 Jan 2022 01:11:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1358A42942; Mon, 24 Jan 2022 01:06:43 +0100 (CET) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by mails.dpdk.org (Postfix) with ESMTP id A3A4D42929 for ; Mon, 24 Jan 2022 01:06:38 +0100 (CET) Received: by mail-pf1-f172.google.com with SMTP id a8so8884681pfa.6 for ; Sun, 23 Jan 2022 16:06:38 -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=bf/0DFpx8QeYdoHIewUo8kVFk8V+0RfgAysbEAot7eGrurYp1ePZXK35/PD1hEWJI1 4xBCfOPmzQ3c1syoFOi1nfvBURI0t3tzsIUjZ7AVei6Tw+ADcNjA1/K2MA9eySo68Im4 CN/sWiaXAc9eAcVnxCCsR95RVRGXeyNvlpCNxA0A594661X0yWEooPTxIBDKPTeXvBWd EcGxk4klF0UMrBHpFKZcmK5+hB2mgxTOQOF1ULuareseNQwoAsUJucwqTZWEH1/JnAjP 607QmyYdylNQW7utTNYVFqSEGrRv9rhGojHx7FlDH/eGcA6DI+4mxo6QmcgiHkNKhXtX wyOw== 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=SMtWVP2lb0iepkvDKd+mZ96LxxA6JMDXDbZXSFBRpq/vlyBhq1WAsy9TZWi/j9R0ei o6XibWhFS24+PvrBDrHgZGWe3p9djPtMYUe4egmGnR6vFOan+wPUS0ELDk8fzJRvWqXy DS2Dv8TDqEV1vJQ4CJwq0v0k+ZGqRxU7Aiep68hQF+a9tknQl+XlwuOGYLjisGGMz+4m /gM4yBcTzLG6CF3aZFLD8SdlBUa53XPJeVHLGx7kXOXr+oy28EqR7s8s2sbYFg/bfBZ+ 1pVjDA2Z6xhX/trjXmhb0o7w4nkiSNB6XCtBHmRQLd+eP8Yxrqv1r1nl+CKoI/B3vX/h 1EhA== X-Gm-Message-State: AOAM530KmhVSMJ7Z9gXYOM/RueZlZpc7vKx6yy/2rKfClStfKHX7nCIw FFagKefrPppRDDorTSb3DsdhIjzA5wuzqQ== X-Google-Smtp-Source: ABdhPJyVBAVVlxRRdqUzGzh1QJv84p3exkxqExnVxTJqthMLvDbUphs/uRJgbcM6Jqygxkf65y/Z4w== X-Received: by 2002:a63:c009:: with SMTP id h9mr10015006pgg.36.1642982797609; Sun, 23 Jan 2022 16:06:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:06:37 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Ori Kam Subject: [PATCH 73/82] regex/mlx5: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:05:09 -0800 Message-Id: <20220124000518.319850-74-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/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