diff options
author | Jason Yan <yanaijie@huawei.com> | 2020-05-06 14:16:30 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-06 13:57:30 -0700 |
commit | f9cbf19c7f5d92e3e91727b6dff6e43b1d6a62a3 (patch) | |
tree | d8b6bd59b5c9b27928dd6f90612ca0c65e154c1a /drivers/net/ethernet/mellanox/mlx4 | |
parent | 8741e18419bf4b9e3b02c0ed01ea13f1aa497fa7 (diff) |
net: mlx4: remove unneeded variable "err" in mlx4_en_get_rxfh()
Fix the following coccicheck warning:
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c:1238:5-8: Unneeded
variable: "err". Return "0" on line 1252
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 8a5ea2543670..216e6b2e9eed 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -1235,7 +1235,6 @@ static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key, struct mlx4_en_priv *priv = netdev_priv(dev); u32 n = mlx4_en_get_rxfh_indir_size(dev); u32 i, rss_rings; - int err = 0; rss_rings = priv->prof->rss_rings ?: n; rss_rings = rounddown_pow_of_two(rss_rings); @@ -1249,7 +1248,7 @@ static int mlx4_en_get_rxfh(struct net_device *dev, u32 *ring_index, u8 *key, memcpy(key, priv->rss_key, MLX4_EN_RSS_KEY_SIZE); if (hfunc) *hfunc = priv->rss_hash_fn; - return err; + return 0; } static int mlx4_en_set_rxfh(struct net_device *dev, const u32 *ring_index, |