net/txgbe: fix queue statistics mapping
[dpdk.git] / drivers / regex / mlx5 / mlx5_rxp.c
index 5ead3ca..ed3af15 100644 (file)
@@ -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;
@@ -166,7 +166,6 @@ mlx5_regex_configure(struct rte_regexdev *dev,
                DRV_LOG(DEBUG, "Regex config without rules programming!");
        return 0;
 configure_error:
-       if (priv->qps)
-               rte_free(priv->qps);
+       rte_free(priv->qps);
        return -rte_errno;
 }