summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/a2mp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r--net/bluetooth/a2mp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index f04c44146663..35e188c7a441 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -594,6 +594,7 @@ static void amp_mgr_destroy(struct kref *kref)
594 list_del(&mgr->list); 594 list_del(&mgr->list);
595 mutex_unlock(&amp_mgr_list_lock); 595 mutex_unlock(&amp_mgr_list_lock);
596 596
597 amp_ctrl_list_flush(mgr);
597 kfree(mgr); 598 kfree(mgr);
598} 599}
599 600
@@ -630,6 +631,10 @@ static struct amp_mgr *amp_mgr_create(struct l2cap_conn *conn)
630 631
631 kref_init(&mgr->kref); 632 kref_init(&mgr->kref);
632 633
634 /* Remote AMP ctrl list initialization */
635 INIT_LIST_HEAD(&mgr->amp_ctrls);
636 mutex_init(&mgr->amp_ctrls_lock);
637
633 mutex_lock(&amp_mgr_list_lock); 638 mutex_lock(&amp_mgr_list_lock);
634 list_add(&mgr->list, &amp_mgr_list); 639 list_add(&mgr->list, &amp_mgr_list);
635 mutex_unlock(&amp_mgr_list_lock); 640 mutex_unlock(&amp_mgr_list_lock);