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 F3B84A04A6; Mon, 24 Jan 2022 01:08:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8CA114288A; Mon, 24 Jan 2022 01:06:04 +0100 (CET) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by mails.dpdk.org (Postfix) with ESMTP id 0AB30427BC for ; Mon, 24 Jan 2022 01:06:01 +0100 (CET) Received: by mail-pf1-f171.google.com with SMTP id e28so9785762pfj.5 for ; Sun, 23 Jan 2022 16:06:00 -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=UxCZBqyu6MSvf11X954JLN/1HKU1fI1b43AVJgVJ5k1F4c9XeVN2QKzd4fSJOL8+A6 bwhSNyElTS27srZMhUgopjqKkjYzPfEDVTY9j5G+h6jCCJNG6dVwWXFhb28QsxfQbhH7 KGtDOr9Y0DebmOLLQ6ilLJcm78SxY+SRjhbvpgsweLCWfCTIA7YYDRMCeGVJChZlOafC FJBq4c3FS1bOvolBX9jUeHJQjm5j2kVTUPZF/wiyPUDjVUCx2nJiFqDToy0YJp3SpGgp T8cAdPK5cVU0Gfm4TIJpImFG1ZcvHPl6mOe573W8avjEWNRdtr/T/PtEFF7m9RYjOU6z YwIw== 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=FBm8tnAYrXJQwVYfWz6N7GtToDTw753wR247sOEEWfIe+C/71kbdv1fqw+Kl1WQPD+ GqaW+hy4GSNF6LfihAMvJQCIwR4sl9tQUjgZUDlMgV92GBXaF+5Dw3U8c9FwlH7u5B/n ubo7GPnmZ/OAjG5ixzEstFGUTjjuBhCsi50E6vHHdQWmnAbB+SMZ6G7EP4GwsiPER0D/ Qv9Bac5vo4e7mF+Hkk4YZXJZKBWpzeBxyOft8gDmlTP1fLlUeegyPf4lpBnxOv+YkHog C/tVhToZmANlN8VTc+TB3OBNAw1Eqq7TqREql86ts87TN2TZNwwXEhWCBa/ExIzFV1Gn Ztvw== X-Gm-Message-State: AOAM530AnsAEErfvMjoXg/xzdDJMHmb0LjWICQpHGTmUwLWyTqg//Pke 9oHuik3LQrPSf+4tMHyw3vU5VPr1HQIjLQ== X-Google-Smtp-Source: ABdhPJxtPPXHFhaNMfQHRJOFqEv93JPTXfFiWmsgfOigCDVgtejZNK1QSWnl9eRsJ31kws/hHZP/sw== X-Received: by 2002:a62:7506:0:b0:4c7:cf2b:81b5 with SMTP id q6-20020a627506000000b004c7cf2b81b5mr8143238pfc.54.1642982760048; Sun, 23 Jan 2022 16:06:00 -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.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jan 2022 16:05:59 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jay Zhou Subject: [PATCH 37/82] crypto/virtio: remove unnecessary NULL checks Date: Sun, 23 Jan 2022 16:04:33 -0800 Message-Id: <20220124000518.319850-38-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/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