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 2BD04A0352; Tue, 25 Jan 2022 12:52:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 10927426E2; Tue, 25 Jan 2022 12:52:00 +0100 (CET) Received: from out203-205-221-205.mail.qq.com (out203-205-221-205.mail.qq.com [203.205.221.205]) by mails.dpdk.org (Postfix) with ESMTP id BE128426DF for ; Tue, 25 Jan 2022 12:51:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1643111514; bh=vIxiFCxo13+J/Po0IMvbjCo6NJazJz/XpRTN9wspBhA=; h=From:To:Cc:Subject:Date; b=WMkiY7N5zFdGj7iI3RS7emyTuG34chDZ1cwOvPfxX7OLQNf+zYeTB6GciGKQkCf6/ a+Jrab6u2EBElOjEF7hDHP2dtzk6Srl11+GxS8KYIQQjsDWs5aKqwgZcOcMM9WzfSA MwHHCU8gpa19ohkCsAN3/jUJPk1wyeUmZl+nX/Ik= Received: from localhost.localdomain ([111.193.130.237]) by newxmesmtplogicsvrsza7.qq.com (NewEsmtp) with SMTP id CEA3A266; Tue, 25 Jan 2022 19:51:42 +0800 X-QQ-mid: xmsmtpt1643111502trf6y9r4y Message-ID: X-QQ-XMAILINFO: MEXGm7gsyBLVvvCox8MHUXUnSmlFr7ihM41+9pVDjQy5ogaXs+QbgTWdRralAK TdwlB4BzYnzq9kTnjZ6I1P/+4z7HAqDEGrlJ5Zxaed9y548DBh9qQpiiIYy9OgCjqZIVVQCEgGPa t8HLVmrFqR0BEZcRaVGxAEB8Z4j/1yXzU1+S0lde6Yo4xCueD5WVr0yIRtt9EBm+knZD/sqPuMze w6AIPinVljiFUfLj624VnvMegSauQQUKuhVx1anrq0wLFd8lDLAESBP7zjEk5Cd/ICsPo9oB+ox+ U/rv503BS/v8+yc0ei9kp5NQimRNZxt0LsI7aSsUDANYV0XLpzbezzIglxB3dcOF51IGFBKussME 0C7mgdGpklywprmXIZJo8EqEM/53yYNwmAh9F5IHPAvPFsBXZGbvjbSwj8SFzFlqcb61yhDk4Fnr U4pRJzviwRvbJWw1wVO1VZ9eZL2ohRZtwdZdBHkhiYuPgY0V76VdzSQxaITR5oaYyQ+EL8RzSzSm 3cBr412r+um7Ftu9zPVTSDte69wy4uUVS8GLE6Rzat1AXXF/G2C7HLLmyew17t5xqIJdLre7dhtP lZeGEqwv19dcF2MIO/ya0AnVZk9vjioHF8LKoqS/1968O8HEl2/kGoxj53EA85cjMWTVHUv6LElO 9ZiOuV689xHC+PcfiUn4XWa7M6rPiu9Q+lX4xE/LTP9GlY0NBeYEl/KBoGAgP6skU5gRMiBm7zqp RF3YjR7Xat4k2igaI9V8fX1EbjWNut3CK5/JYLGAUCQn8Wx4IxhPYu+lsqzI3uvPAWMfl702RRVq KAY2Rpq4lHdXHHese7N0AzbXYvqzmFJRPDZVOUMS2OZ6DCa7KyVsmLrZCo3XCCmEF/wHElJMGXFN QybQJbb1ZR3Gg+iybASpzXZ4KzXRrujw== From: Weiguo Li To: orika@nvidia.com Cc: dev@dpdk.org Subject: [PATCH] regex/mlx5: fix improper memory object check Date: Tue, 25 Jan 2022 19:51:41 +0800 X-OQ-MSGID: <20220125115141.30325-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 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 Fixes: e3dbbf718ebc ("regex/mlx5: support configuration") Signed-off-by: Weiguo Li --- drivers/regex/mlx5/mlx5_rxp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regex/mlx5/mlx5_rxp.c b/drivers/regex/mlx5/mlx5_rxp.c index 5ead3ca341..51b6e71376 100644 --- a/drivers/regex/mlx5/mlx5_rxp.c +++ b/drivers/regex/mlx5/mlx5_rxp.c @@ -148,7 +148,7 @@ mlx5_regex_configure(struct rte_regexdev *dev, dev->data->dev_conf.nb_queue_pairs = priv->nb_queues; priv->qps = rte_zmalloc(NULL, sizeof(struct mlx5_regex_qp) * priv->nb_queues, 0); - if (!priv->nb_queues) { + if (!priv->qps) { DRV_LOG(ERR, "can't allocate qps memory"); rte_errno = ENOMEM; return -rte_errno; -- 2.25.1