net/mlx5: DR, Fix error flow in creating matcher
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Tue, 14 Dec 2021 10:56:18 +0000 (12:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 11:02:29 +0000 (12:02 +0100)
commit3894cf715ece7db93cf42e3727264b31ef5fc059
tree54b26f00ebc1a77a611835015307b79c76c996d0
parent1d3076cf4315174033aa3a39dc5cd4b7b168780d
net/mlx5: DR, Fix error flow in creating matcher

[ Upstream commit 84dfac39c61fde04126e23723138128b50cd036f ]

The error code of nic matcher init functions wasn't checked.
This patch improves the matcher init function and fix error flow bug:
the handling of match parameter is moved into a separate function
and error flow is simplified.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c