Commit 902c0245 authored by Saeed Mahameed's avatar Saeed Mahameed

net/mlx5e: CT: remove useless conversion to PTR_ERR then ERR_PTR

Just return the ptr directly.
Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent 8271e341
...@@ -770,7 +770,6 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv, ...@@ -770,7 +770,6 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv,
struct mlx5_ct_counter *shared_counter; struct mlx5_ct_counter *shared_counter;
struct mlx5_ct_entry *rev_entry; struct mlx5_ct_entry *rev_entry;
__be16 tmp_port; __be16 tmp_port;
int ret;
/* get the reversed tuple */ /* get the reversed tuple */
tmp_port = rev_tuple.port.src; tmp_port = rev_tuple.port.src;
...@@ -804,10 +803,8 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv, ...@@ -804,10 +803,8 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv,
mutex_unlock(&ct_priv->shared_counter_lock); mutex_unlock(&ct_priv->shared_counter_lock);
shared_counter = mlx5_tc_ct_counter_create(ct_priv); shared_counter = mlx5_tc_ct_counter_create(ct_priv);
if (IS_ERR(shared_counter)) { if (IS_ERR(shared_counter))
ret = PTR_ERR(shared_counter); return shared_counter;
return ERR_PTR(ret);
}
shared_counter->is_shared = true; shared_counter->is_shared = true;
refcount_set(&shared_counter->refcount, 1); refcount_set(&shared_counter->refcount, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment