Skip to content

Commit c977645

Browse files
maorgottliebjgunthorpe
authored andcommitted
RDMA/mlx5: Add missing check for return value in get namespace flow
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: 52438be ("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 <[email protected]> Signed-off-by: Maor Gottlieb <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 62494ec commit c977645

File tree

1 file changed

+2
-4
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-4
lines changed

drivers/infiniband/hw/mlx5/fs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,12 +2078,10 @@ static int mlx5_ib_matcher_ns(struct uverbs_attr_bundle *attrs,
20782078
if (err)
20792079
return err;
20802080

2081-
if (flags) {
2082-
mlx5_ib_ft_type_to_namespace(
2081+
if (flags)
2082+
return mlx5_ib_ft_type_to_namespace(
20832083
MLX5_IB_UAPI_FLOW_TABLE_TYPE_NIC_TX,
20842084
&obj->ns_type);
2085-
return 0;
2086-
}
20872085
}
20882086

20892087
obj->ns_type = MLX5_FLOW_NAMESPACE_BYPASS;

0 commit comments

Comments
 (0)