RDMA/mlx5: Add missing check for return value in get namespace flow
[ Upstream commitc9776457bd
] Add missing check for return value when calling to mlx5_ib_ft_type_to_namespace, even though it can't really fail in this specific call. Fixes:52438be441
("RDMA/mlx5: Allow inserting a steering rule to the FDB") Link: https://lore.kernel.org/r/7b9ceda217d9368a51dc47a46b769bad4af9ac92.1659256069.git.leonro@nvidia.com Reviewed-by: Itay Aveksis <itayav@nvidia.com> Signed-off-by: Maor Gottlieb <maorg@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d6d4b5f13b
commit
5fd7eefeee
@ -2050,12 +2050,10 @@ static int mlx5_ib_matcher_ns(struct uverbs_attr_bundle *attrs,
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (flags) {
|
if (flags)
|
||||||
mlx5_ib_ft_type_to_namespace(
|
return mlx5_ib_ft_type_to_namespace(
|
||||||
MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX,
|
MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX,
|
||||||
&obj->ns_type);
|
&obj->ns_type);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj->ns_type = MLX5_FLOW_NAMESPACE_BYPASS;
|
obj->ns_type = MLX5_FLOW_NAMESPACE_BYPASS;
|
||||||
|
Reference in New Issue
Block a user