mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-08 07:38:10 +00:00
mlxsw: spectrum: remove redundant check if err is zero
There is an earlier check and return if err is non-zero, so the check to see if it is zero is redundant in every iteration of the loop and hence the check can be removed. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f8c2865a9
commit
faac0ff0a5
1 changed files with 1 additions and 1 deletions
|
@ -1664,7 +1664,7 @@ static void __mlxsw_sp_port_get_stats(struct net_device *dev,
|
||||||
return;
|
return;
|
||||||
mlxsw_sp_port_get_stats_raw(dev, grp, prio, ppcnt_pl);
|
mlxsw_sp_port_get_stats_raw(dev, grp, prio, ppcnt_pl);
|
||||||
for (i = 0; i < len; i++)
|
for (i = 0; i < len; i++)
|
||||||
data[data_index + i] = !err ? hw_stats[i].getter(ppcnt_pl) : 0;
|
data[data_index + i] = hw_stats[i].getter(ppcnt_pl);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mlxsw_sp_port_get_stats(struct net_device *dev,
|
static void mlxsw_sp_port_get_stats(struct net_device *dev,
|
||||||
|
|
Loading…
Add table
Reference in a new issue