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 A7F36A04AD; Mon, 24 Jan 2022 18:50:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 345C4428B1; Mon, 24 Jan 2022 18:48:01 +0100 (CET) Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) by mails.dpdk.org (Postfix) with ESMTP id C84B542898 for ; Mon, 24 Jan 2022 18:47:57 +0100 (CET) Received: by mail-pl1-f180.google.com with SMTP id j16so5760224plx.4 for ; Mon, 24 Jan 2022 09:47:57 -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=nEVv/FhAmlwYC9FiOZNo7RW7HD3udoux8p6UIZL8/AzMxcbrRFC9PdvNdhIRLvX/MN rd6szlIfd01etWtvFSSMTGS/scPHr9fZS/vBU8ryWjsG/Hc6H/GEieANUcNoQ/nwxs2n nLrh9XoLQ7yt6TRxTRLvZX3Jh/lwJ+Ov5V24yzEcohfjsF4JeP9nvQMZr7B9n23guui0 2g2WfOkDGtvhQ5aybxpkeO33ohLBXkqTCntxT7/YOzZQZ6xLkFzbGAR/vzhw6Qy7PDYg o2Gj3UwJRBtkGUGjZJCLcEGGRcuUsNc4AR6+UE5TJSFkxzhCeDlJsVZkN5I+mwS6rwBJ huZw== 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=NXqobAqHVd5encHdydzMwIdYyytfp/R99jZ8ce9xGNuroEWV3yuMzhfhQT1HZdLQoX sBWNDzHCvAVx2VLIQ5GMyiadOy3TegfLoeGxV3ueUbYkKHHSYy4PbM6zi+2q4AXvUdTv uMPCnTi1x9/Gk2W2Yz1JWRFUyh2Sb3QRdIiha53z4nkOc0+LNKyH0ZNDpQQmA4SJIram kcromGvj4D/UQkJVTADL4MVqUp9g+abP+kUbUeMounKHtG6WX/2SQYIsevvX7avhuBxY L7NZEys0Gb4PJk71kbBzmMNfr2UG4SpS1LDe+nciFV3PQDOlKZC+xh6q8fXqB8aK4xp2 FVlA== X-Gm-Message-State: AOAM531iYbQgDqSQGGz+CBxQSpvKX2e42jLz0+o1NeByBpSrCZ+o6/+Z o5pj4d+xCTWL4sfzuAk3d/DEH/AvzGG+6g== X-Google-Smtp-Source: ABdhPJz0HI6bFEYcG0GwI4M7dBRS4M9DYlmC7mtlC5PtX1ocZpGytNIRRbk8Bz1DG/i1xpz7MRx0iA== X-Received: by 2002:a17:902:ab8f:b0:14a:adaa:93f2 with SMTP id f15-20020a170902ab8f00b0014aadaa93f2mr15012596plr.131.1643046476785; Mon, 24 Jan 2022 09:47:56 -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.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:47:56 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Fan Zhang , Pablo de Lara Subject: [PATCH v2 32/83] crypto/ipsec_mb: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:28 -0800 Message-Id: <20220124174719.14417-33-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/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