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 14B0DA04A6; Mon, 24 Jan 2022 01:08:17 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 79C5B42861; Mon, 24 Jan 2022 01:05:58 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 0780B42850 for ; Mon, 24 Jan 2022 01:05:55 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id q75so13646412pgq.5 for ; Sun, 23 Jan 2022 16:05:54 -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=NMDYOBW94oD7LiU+bA7rZElZJGIO2nROgMHnOqTiJ24=; b=k/sUkqw87/TGjBZ4/y/dm9B2NQEVKk3NSzxyu/unlzWCYILLf5fd2QXeUpdedO+X7C Btu1YfB2qn6PoZehvFG8/QQeDPcHbwZcMrulyDmM/JH7RibM8fCEBP1m8KPVOPNn3CcX ZgmkD9ZsZvXmpebgioIbVSCp0w01OzxhL7FzT3uLw+l0cjmEwSgYi2K1URxomxGfNhoE K7j4AIAPu4ZkHaEXZ0xiOoSlbUDZLYQfOtJK0G/WkLg792YSkpkjUIjetc9Fm1ikJTsy cD7UvlLf78We/dUQf0/o+DXpcEhDIjASNRtzhoIe37XYBJmpk8jRMGKd393Y40RTC/2z JyHA== 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=NMDYOBW94oD7LiU+bA7rZElZJGIO2nROgMHnOqTiJ24=; b=ojgpJpnh8q34yKiq6GNTgONZ8WCfbXbt44vTUoiszAgbgEqCKYt3lJxqIcxylrMB/p CPWMcYgLYP1Z3DgaX9xmZybYWSRsvjDp/u9WVzD5+5RZQepd2KYRX+CLI242li/j14Cz CyYJVXv8XmOH5tMmmH/tkbiVXCx8+2d6kVd7egK6zFBgzFMX0KikYZhnpQWJo/nvAwmb BbViZJL7d6BegN/noI4l5SaBE6t3ce4gdchTvnRTolcGyCKP9G8dFGFffbRJzZ3P7aGP rDcqdJEv/PUEcpugpLei9WaPy2lcJC/mHAD7S9HtiKocEtsd7QA2kvnXY1gQfO7jG20p ztOg== X-Gm-Message-State: AOAM533voLMjriPmBOmENg4OS46qVLAhFx01Mb1E8+0gM9fhjx6xuSa4 zRLqY+qzk4YrnnRjOfP3kQttfKnSQmfyRQ== X-Google-Smtp-Source: ABdhPJzVhNBfpkeyoXHDf+2y04/9TKlYPcuTL9Og/3oIRQsvolhtiUm4Y2krSBrHHrmxv8U36/7dRQ== X-Received: by 2002:a65:4482:: with SMTP id l2mr9970157pgq.141.1642982754038; Sun, 23 Jan 2022 16:05:54 -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.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fan Zhang , Pablo de Lara Subject: [PATCH 31/82] crypto/ipsec_mb: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:27 -0800 Message-Id: <20220124000518.319850-32-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/crypto/ipsec_mb/ipsec_mb_ops.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c index 189262c4ad52..f808da9edf89 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c @@ -102,8 +102,7 @@ ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id) if (qp != NULL && rte_eal_process_type() == RTE_PROC_PRIMARY) { r = rte_ring_lookup(qp->name); - if (r) - rte_ring_free(r); + rte_ring_free(r); #if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM if (qp->mb_mgr) @@ -291,8 +290,7 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id, if (qp->mb_mgr_mz) rte_memzone_free(qp->mb_mgr_mz); #endif - if (qp) - rte_free(qp); + rte_free(qp); return ret; } -- 2.30.2