aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/infiniband/core/sa_query.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/sa_query.c b/drivers/infiniband/core/sa_query.c
index acda7d63d6fe..501cc054cb3b 100644
--- a/drivers/infiniband/core/sa_query.c
+++ b/drivers/infiniband/core/sa_query.c
@@ -956,6 +956,8 @@ static void ib_sa_remove_one(struct ib_device *device)
956 956
957 ib_unregister_event_handler(&sa_dev->event_handler); 957 ib_unregister_event_handler(&sa_dev->event_handler);
958 958
959 flush_scheduled_work();
960
959 for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) { 961 for (i = 0; i <= sa_dev->end_port - sa_dev->start_port; ++i) {
960 ib_unregister_mad_agent(sa_dev->port[i].agent); 962 ib_unregister_mad_agent(sa_dev->port[i].agent);
961 kref_put(&sa_dev->port[i].sm_ah->ref, free_sm_ah); 963 kref_put(&sa_dev->port[i].sm_ah->ref, free_sm_ah);