net/mlx5e: Remove redundant check in get ethtool stats
authorGal Pressman <galp@mellanox.com>
Thu, 11 Jan 2018 14:24:06 +0000 (16:24 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 26 Mar 2018 20:47:15 +0000 (13:47 -0700)
ethtool core code makes sure data isn't NULL before calling
get_ethtool_stats, testing it again in the driver is redundant.

Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 62061fd..d415e67 100644 (file)
@@ -203,9 +203,6 @@ void mlx5e_ethtool_get_ethtool_stats(struct mlx5e_priv *priv,
 {
        int i, idx = 0;
 
-       if (!data)
-               return;
-
        mutex_lock(&priv->state_lock);
        mlx5e_update_stats(priv);
        mutex_unlock(&priv->state_lock);