DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Weiguo Li <liwg06@foxmail.com>
Cc: orika@nvidia.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] regex/mlx5: fix improper memory object check
Date: Thu, 10 Feb 2022 16:35:41 +0100	[thread overview]
Message-ID: <5772253.alqRGMn8q6@thomas> (raw)
In-Reply-To: <tencent_4CA38D308974C5CCF2789C12444CEBDC7F0A@qq.com>

25/01/2022 12:51, Weiguo Li:
> Fixes: e3dbbf718ebc ("regex/mlx5: support configuration")

Adding Cc stable@dpdk.org for backport.

> Signed-off-by: Weiguo Li <liwg06@foxmail.com>
> ---
>  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");

This mistake would have been caught earlier if the coding style was respected:
a pointer should be explictly compared with NULL.

Applied, thanks.



      reply	other threads:[~2022-02-10 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 11:51 Weiguo Li
2022-02-10 15:35 ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5772253.alqRGMn8q6@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=liwg06@foxmail.com \
    --cc=orika@nvidia.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).