common/mlx5: fix error handling in multi-class probe
authorMichael Baum <michaelba@nvidia.com>
Wed, 24 Nov 2021 22:02:38 +0000 (00:02 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 22 Dec 2021 08:55:47 +0000 (09:55 +0100)
commit8928997a1388ba1b045a55732acced4baf00b21d
tree79e2144ccdd957f920362c7aa99889ea8ab7932b
parentc59f93d9a1e09e21e27f5bde7d8632a4d0503582
common/mlx5: fix error handling in multi-class probe

The common drivers_probe function calls in a loop to all probe functions
for classes requested by the user. After it manages to probe them all,
it updates this on the device in the "classes_loaded" field.

If one of them fails, all those probed to it are remove using the
drivers_remove function. However, this function only releases the
classes in the "classes_loaded" field on the given device and misses the
newly probed classes.

This patch removes the condition from the release function, and ensures
that the caller function sends a more accurate parameter.

Fixes: 8a41f4deccc3 ("common/mlx5: introduce layer for multiple class drivers")
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/common/mlx5/mlx5_common.c