summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhu Yanjun <yanjun.zhu@oracle.com>2017-07-24 04:22:44 -0400
committerDavid S. Miller <davem@davemloft.net>2017-07-24 17:26:32 -0700
commitf575a02ee76cda1eff5e6949aff7cf5c386e3977 (patch)
treedf9d4d30718f6572fa40526f87b62475df1970a7
parentb5f3e0d430122a551cbc2b88068dae8b2c2c0031 (diff)
downloadlinux-f575a02ee76cda1eff5e6949aff7cf5c386e3977.tar.gz
linux-f575a02ee76cda1eff5e6949aff7cf5c386e3977.tar.bz2
linux-f575a02ee76cda1eff5e6949aff7cf5c386e3977.zip
mlx4_en: remove unnecessary error check
The function mlx4_en_get_profile always return zero. So it is not necessary to check its return value. CC: Joe Jin <joe.jin@oracle.com> CC: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_main.c b/drivers/net/ethernet/mellanox/mlx4/en_main.c
index 2b0cbca4beb5..686e18de9a97 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_main.c
@@ -147,7 +147,7 @@ void mlx4_en_update_loopback_state(struct net_device *dev,
mutex_unlock(&priv->mdev->state_lock);
}
-static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
+static void mlx4_en_get_profile(struct mlx4_en_dev *mdev)
{
struct mlx4_en_profile *params = &mdev->profile;
int i;
@@ -176,8 +176,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
params->prof[i].rss_rings = 0;
params->prof[i].inline_thold = inline_thold;
}
-
- return 0;
}
static void *mlx4_en_get_netdev(struct mlx4_dev *dev, void *ctx, u8 port)
@@ -309,10 +307,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
}
/* Build device profile according to supplied module parameters */
- if (mlx4_en_get_profile(mdev)) {
- mlx4_err(mdev, "Bad module parameters, aborting\n");
- goto err_mr;
- }
+ mlx4_en_get_profile(mdev);
/* Configure which ports to start according to module parameters */
mdev->port_cnt = 0;