net/mlx5: Use PTR_ERR_OR_ZERO rather than its implementation
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to use it directly. hence just replace it. Signed-off-by: zhong jiang <zhongjiang@huawei.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:

committato da
Saeed Mahameed

parent
e53e665558
commit
a2b7189be6
@@ -988,10 +988,7 @@ mlx5e_tc_add_nic_flow(struct mlx5e_priv *priv,
|
||||
&flow_act, dest, dest_ix);
|
||||
mutex_unlock(&priv->fs.tc.t_lock);
|
||||
|
||||
if (IS_ERR(flow->rule[0]))
|
||||
return PTR_ERR(flow->rule[0]);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(flow->rule[0]);
|
||||
}
|
||||
|
||||
static void mlx5e_tc_del_nic_flow(struct mlx5e_priv *priv,
|
||||
|
Fai riferimento in un nuovo problema
Block a user