aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/core/cm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index b10ade92efed..4df405157086 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3759,6 +3759,7 @@ static void cm_remove_one(struct ib_device *device)
3759 port = cm_dev->port[i-1]; 3759 port = cm_dev->port[i-1];
3760 ib_modify_port(device, port->port_num, 0, &port_modify); 3760 ib_modify_port(device, port->port_num, 0, &port_modify);
3761 ib_unregister_mad_agent(port->mad_agent); 3761 ib_unregister_mad_agent(port->mad_agent);
3762 flush_workqueue(cm.wq);
3762 cm_remove_port_fs(port); 3763 cm_remove_port_fs(port);
3763 } 3764 }
3764 kobject_put(&cm_dev->dev_obj); 3765 kobject_put(&cm_dev->dev_obj);
@@ -3813,6 +3814,7 @@ static void __exit ib_cm_cleanup(void)
3813 cancel_delayed_work(&timewait_info->work.work); 3814 cancel_delayed_work(&timewait_info->work.work);
3814 spin_unlock_irq(&cm.lock); 3815 spin_unlock_irq(&cm.lock);
3815 3816
3817 ib_unregister_client(&cm_client);
3816 destroy_workqueue(cm.wq); 3818 destroy_workqueue(cm.wq);
3817 3819
3818 list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) { 3820 list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) {
@@ -3820,7 +3822,6 @@ static void __exit ib_cm_cleanup(void)
3820 kfree(timewait_info); 3822 kfree(timewait_info);
3821 } 3823 }
3822 3824
3823 ib_unregister_client(&cm_client);
3824 class_unregister(&cm_class); 3825 class_unregister(&cm_class);
3825 idr_destroy(&cm.local_id_table); 3826 idr_destroy(&cm.local_id_table);
3826} 3827}