From 34c84ebbbcc8fc71901e17899f1bf1b1ba815084 Mon Sep 17 00:00:00 2001 From: Michael Baum Date: Mon, 12 Jul 2021 10:06:44 +0300 Subject: [PATCH] regex/mlx5: fix redundancy in device removal In the removal function, PMD releases all driver resources and cancels the regexdev registry. However, regexdev registration is accidentally canceled twice. Remove one of them. Fixes: b34d816363b5 ("regex/mlx5: support rules import") Cc: stable@dpdk.org Signed-off-by: Michael Baum Acked-by: Ori Kam --- drivers/regex/mlx5/mlx5_regex.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/regex/mlx5/mlx5_regex.c b/drivers/regex/mlx5/mlx5_regex.c index 279b89acc9..f17b6df47f 100644 --- a/drivers/regex/mlx5/mlx5_regex.c +++ b/drivers/regex/mlx5/mlx5_regex.c @@ -282,8 +282,6 @@ mlx5_regex_dev_remove(struct rte_device *rte_dev) rte_regexdev_unregister(priv->regexdev); if (priv->ctx) mlx5_glue->close_device(priv->ctx); - if (priv->regexdev) - rte_regexdev_unregister(priv->regexdev); rte_free(priv); } return 0; -- 2.20.1