Commit cd16e5b2 authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

mlxsw: spectrum_flower: use PTR_ERR_OR_ZERO()

Fix ptr_ret.cocci warnings:
 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c:543:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 63cc5bcc
...@@ -514,10 +514,9 @@ int mlxsw_sp_flower_tmplt_create(struct mlxsw_sp *mlxsw_sp, ...@@ -514,10 +514,9 @@ int mlxsw_sp_flower_tmplt_create(struct mlxsw_sp *mlxsw_sp,
f->common.chain_index, f->common.chain_index,
MLXSW_SP_ACL_PROFILE_FLOWER, MLXSW_SP_ACL_PROFILE_FLOWER,
&rulei.values.elusage); &rulei.values.elusage);
if (IS_ERR(ruleset))
return PTR_ERR(ruleset);
/* keep the reference to the ruleset */ /* keep the reference to the ruleset */
return 0; return PTR_ERR_OR_ZERO(ruleset);
} }
void mlxsw_sp_flower_tmplt_destroy(struct mlxsw_sp *mlxsw_sp, void mlxsw_sp_flower_tmplt_destroy(struct mlxsw_sp *mlxsw_sp,
......
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