Commit a2b7189b authored by zhong jiang's avatar zhong jiang Committed by Saeed Mahameed
Browse files

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: default avatarzhong jiang <zhongjiang@huawei.com>
Acked-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent e53e6655
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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,