diff options
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 61588bd273bd..2ccb9d31771f 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -699,11 +699,12 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr) | |||
699 | struct mlx4_ib_dev *ibdev = ibdev_ptr; | 699 | struct mlx4_ib_dev *ibdev = ibdev_ptr; |
700 | int p; | 700 | int p; |
701 | 701 | ||
702 | mlx4_ib_mad_cleanup(ibdev); | ||
703 | ib_unregister_device(&ibdev->ib_dev); | ||
704 | |||
702 | for (p = 1; p <= ibdev->num_ports; ++p) | 705 | for (p = 1; p <= ibdev->num_ports; ++p) |
703 | mlx4_CLOSE_PORT(dev, p); | 706 | mlx4_CLOSE_PORT(dev, p); |
704 | 707 | ||
705 | mlx4_ib_mad_cleanup(ibdev); | ||
706 | ib_unregister_device(&ibdev->ib_dev); | ||
707 | iounmap(ibdev->uar_map); | 708 | iounmap(ibdev->uar_map); |
708 | mlx4_uar_free(dev, &ibdev->priv_uar); | 709 | mlx4_uar_free(dev, &ibdev->priv_uar); |
709 | mlx4_pd_free(dev, ibdev->priv_pdn); | 710 | mlx4_pd_free(dev, ibdev->priv_pdn); |