Commit f575a02e authored by Zhu Yanjun's avatar Zhu Yanjun Committed by David S. Miller

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: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b5f3e0d4
...@@ -147,7 +147,7 @@ void mlx4_en_update_loopback_state(struct net_device *dev, ...@@ -147,7 +147,7 @@ void mlx4_en_update_loopback_state(struct net_device *dev,
mutex_unlock(&priv->mdev->state_lock); 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; struct mlx4_en_profile *params = &mdev->profile;
int i; int i;
...@@ -176,8 +176,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev) ...@@ -176,8 +176,6 @@ static int mlx4_en_get_profile(struct mlx4_en_dev *mdev)
params->prof[i].rss_rings = 0; params->prof[i].rss_rings = 0;
params->prof[i].inline_thold = inline_thold; params->prof[i].inline_thold = inline_thold;
} }
return 0;
} }
static void *mlx4_en_get_netdev(struct mlx4_dev *dev, void *ctx, u8 port) 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) ...@@ -309,10 +307,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
} }
/* Build device profile according to supplied module parameters */ /* Build device profile according to supplied module parameters */
if (mlx4_en_get_profile(mdev)) { mlx4_en_get_profile(mdev);
mlx4_err(mdev, "Bad module parameters, aborting\n");
goto err_mr;
}
/* Configure which ports to start according to module parameters */ /* Configure which ports to start according to module parameters */
mdev->port_cnt = 0; mdev->port_cnt = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment