net/mlx5e: CT: Return err_ptr from internal functions
authorSaeed Mahameed <saeedm@mellanox.com>
Mon, 4 May 2020 22:52:14 +0000 (15:52 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 10 Jul 2020 02:51:16 +0000 (19:51 -0700)
commit2acc4551d412607d23fd392d819f3b5bd320de48
treec001855f77a0c99c82ff012ba73a9aa729a84e19
parentd12f4521d3eff83206a0bb4a9135252ffbf1c3b5
net/mlx5e: CT: Return err_ptr from internal functions

Instead of having to deal with converting between int and ERR_PTR for
return values in mlx5_tc_ct_flow_offload(), make the internal helper
functions return a ptr to mlx5_flow_handle instead of passing it as
output param, this will also avoid gcc confusion and false alarms,
thus we remove the redundant ERR_PTR rule initialization.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Suggested-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c