net/mlx5: fix PF leak on PCI probing failure
authorMichael Baum <michaelba@nvidia.com>
Sun, 12 Sep 2021 10:36:24 +0000 (13:36 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 20 Sep 2021 21:12:10 +0000 (23:12 +0200)
commit6856efa54eea23ce2079a23cb661e009421fb833
tree4b5a540f1686828cfeecb43fc512ac26fc1c5336
parentc76db6a4964e91a79d877a009d15d5c62507136a
net/mlx5: fix PF leak on PCI probing failure

During PCI probe, the internal probe function is called per PF.

If one of them fails, it was missing a proper destroy for the previously
probed PFs.

This fixes the behavior by destroying all previously probed PFs.

Fixes: 08c2772fc747 ("net/mlx5: support list of representor PF")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h