Skip to content

Commit

Permalink
net/mlx5: Use ERR_CAST() instead of coding it
Browse files Browse the repository at this point in the history
This makes it more readable that rule is being used to return an err.

Signed-off-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Roi Dayan authored and Saeed Mahameed committed Jul 18, 2018
1 parent 0f40391 commit d34c6ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1825,7 +1825,7 @@ _mlx5_add_flow_rules(struct mlx5_flow_table *ft,

g = alloc_auto_flow_group(ft, spec);
if (IS_ERR(g)) {
rule = (void *)g;
rule = ERR_CAST(g);
up_write_ref_node(&ft->node);
return rule;
}
Expand Down

0 comments on commit d34c6ef

Please sign in to comment.