regex/mlx5: fix memory allocation check
The wrong field was checked after allocation. Fixes: e3dbbf718ebc ("regex/mlx5: support configuration") Cc: stable@dpdk.org Signed-off-by: Weiguo Li <liwg06@foxmail.com>
This commit is contained in:
parent
56b5bb509f
commit
60e9028a8e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user