Skip to content

Commit

Permalink
regex/mlx5: fix redundancy in device removal
Browse files Browse the repository at this point in the history
[ upstream commit 34c84eb ]

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: b34d816 ("regex/mlx5: support rules import")

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
  • Loading branch information
michaelbaum1 authored and bluca committed Jul 26, 2021
1 parent 0760fa2 commit da1a6d5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/regex/mlx5/mlx5_regex.c
Expand Up @@ -248,8 +248,6 @@ mlx5_regex_pci_remove(struct rte_pci_device *pci_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;
Expand Down

0 comments on commit da1a6d5

Please sign in to comment.