diff options
Diffstat (limited to 'drivers/net/mlx4')
-rw-r--r-- | drivers/net/mlx4/en_main.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index 23955d8891b7..b510000d8391 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -248,28 +248,11 @@ static void *mlx4_en_add(struct mlx4_dev *dev) | |||
248 | /* Create a netdev for each port */ | 248 | /* Create a netdev for each port */ |
249 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { | 249 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { |
250 | mlx4_info(mdev, "Activating port:%d\n", i); | 250 | mlx4_info(mdev, "Activating port:%d\n", i); |
251 | if (mlx4_en_init_netdev(mdev, i, &mdev->profile.prof[i])) { | 251 | if (mlx4_en_init_netdev(mdev, i, &mdev->profile.prof[i])) |
252 | mdev->pndev[i] = NULL; | 252 | mdev->pndev[i] = NULL; |
253 | goto err_free_netdev; | ||
254 | } | ||
255 | } | 253 | } |
256 | return mdev; | 254 | return mdev; |
257 | 255 | ||
258 | |||
259 | err_free_netdev: | ||
260 | mlx4_foreach_port(i, dev, MLX4_PORT_TYPE_ETH) { | ||
261 | if (mdev->pndev[i]) | ||
262 | mlx4_en_destroy_netdev(mdev->pndev[i]); | ||
263 | } | ||
264 | |||
265 | mutex_lock(&mdev->state_lock); | ||
266 | mdev->device_up = false; | ||
267 | mutex_unlock(&mdev->state_lock); | ||
268 | flush_workqueue(mdev->workqueue); | ||
269 | |||
270 | /* Stop event queue before we drop down to release shared SW state */ | ||
271 | destroy_workqueue(mdev->workqueue); | ||
272 | |||
273 | err_mr: | 256 | err_mr: |
274 | mlx4_mr_free(dev, &mdev->mr); | 257 | mlx4_mr_free(dev, &mdev->mr); |
275 | err_uar: | 258 | err_uar: |