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 E8A9BA04AD; Mon, 24 Jan 2022 18:50:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 208F242886; Mon, 24 Jan 2022 18:48:08 +0100 (CET) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id ED5004281F for ; Mon, 24 Jan 2022 18:48:03 +0100 (CET) Received: by mail-pj1-f47.google.com with SMTP id g9-20020a17090a67c900b001b4f1d71e4fso506672pjm.4 for ; Mon, 24 Jan 2022 09:48:03 -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=6V9Q1x1ay+tYytT9xq7nAcA525Y1BSrTieqlJ955eIs=; b=PYJa6qHbukYkLdZ2qygUyFLSSRRLZkSj5kXAsCQ09ihFJHlLfX0Sf0sQhHsVPX+l0b FVhESbpFacD+LhyjkjQCep9tbpVbvYTWU3MKLuMZiBBaxd6IIfYuFagSMePFMSnfz/C+ wD7Y8gtSGOAyFlO2CLjoMbSQla9A5hTO4kELSGRzB7o2Fq3Ty9Y49S5bYQJZ/ImSD7pg lND+G9INOjibCU0IdwBVS2SC6kACQq9cCXRJPatqbO7dSt9FOIM9KM85wCbM6eaLmuUC P/U5r9fAjxCa71hdbNEKcgqog9twaJjtHaYKICqHTW7WOwOv82mKaJdfCHoesaIf3KNq zyDA== 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=6V9Q1x1ay+tYytT9xq7nAcA525Y1BSrTieqlJ955eIs=; b=nZcfodKnekhL+AK3GroT+n/mFBbwSkPbiqQ+GA8ieY6ZNv9ylX4Rvyt3mIgXan7s50 jnrD/+xuIQ2C9gep4nmVnsD7FcnDGNrTXP0k6rGDMg5wIH9oOTZSQBYkTNqPbeHlYnOX vZH981uZjT5L5HbsUNYhkisgOLEL/6W1mpUljPrFU3HlxqlIieoYlLXh3T0DgHnRwk7u LUikbq1hTiITT4sc6IHQkvtYyjGNRs8HPE/of1r5wNxeIrrLW9y9ddgHvuCUEX4GeHA4 vUdhEv24FiIUofeQ9kWXw129nKmSTVGsQeORoc8QmnBpX2sNf1HH4BNVFFK9QjESz/Hw f59w== X-Gm-Message-State: AOAM533l32AMFqylLl3U9QWqiFhDq4juKdhEoRZ3dUlb5VNOiB/y/9Uo ncMabQrV59j/CbsYsxuQDlzq2QFxEn2JWg== X-Google-Smtp-Source: ABdhPJzoelDXuFhjqBG2/xtlzMRfDrQmYwvNg+Uqqx2Xoqeh//5GwhgIke16LYj97rRKBRoVFV3vJg== X-Received: by 2002:a17:902:e750:b0:14b:5fe1:f807 with SMTP id p16-20020a170902e75000b0014b5fe1f807mr3210608plf.103.1643046482974; Mon, 24 Jan 2022 09:48:02 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jan 2022 09:48:02 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jay Zhou Subject: [PATCH v2 38/83] crypto/virtio: remove unnecessary NULL checks Date: Mon, 24 Jan 2022 09:46:34 -0800 Message-Id: <20220124174719.14417-39-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/virtio/virtqueue.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/virtio/virtqueue.c b/drivers/crypto/virtio/virtqueue.c index fd8be581c996..3e2db1ebd250 100644 --- a/drivers/crypto/virtio/virtqueue.c +++ b/drivers/crypto/virtio/virtqueue.c @@ -32,10 +32,8 @@ virtqueue_detatch_unused(struct virtqueue *vq) for (idx = 0; idx < vq->vq_nentries; idx++) { cop = vq->vq_descx[idx].crypto_op; if (cop) { - if (cop->sym->m_src) - rte_pktmbuf_free(cop->sym->m_src); - if (cop->sym->m_dst) - rte_pktmbuf_free(cop->sym->m_dst); + rte_pktmbuf_free(cop->sym->m_src); + rte_pktmbuf_free(cop->sym->m_dst); rte_crypto_op_free(cop); vq->vq_descx[idx].crypto_op = NULL; } -- 2.30.2