aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2020-08-03 19:11:36 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-03 18:06:46 -0700
commit928345c08b72dd175d4eefa24900f09706a9a3b5 (patch)
treea4843904560cd2a7224fea92fd9320b038aafdf5 /drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c
parentmlxsw: spectrum_trap: Use 'size_t' for array sizes (diff)
downloadwireguard-linux-928345c08b72dd175d4eefa24900f09706a9a3b5.tar.xz
wireguard-linux-928345c08b72dd175d4eefa24900f09706a9a3b5.zip
mlxsw: spectrum_span: On policer_id_base_ref_count, use dec_and_test
When unsetting policer base, the SPAN code currently uses refcount_dec(). However that function splats when the counter reaches zero, because reaching zero without actually testing is in general indicative of a missing cleanup. There is no cleanup to be done here, but nonetheless, use refcount_dec_and_test() as required. Signed-off-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c')
0 files changed, 0 insertions, 0 deletions