diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-10-18 12:16:19 +0200 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-10-18 12:27:20 +0200 |
commit | f706adfeade767d2194c9f39c0f75e944b0bdd23 (patch) | |
tree | a047952d3ce06440c9743cc5b582079d5df37030 /net/bluetooth/a2mp.c | |
parent | Bluetooth: Zero bredr pointer when chan is deleted (diff) | |
download | linux-f706adfeade767d2194c9f39c0f75e944b0bdd23.tar.xz linux-f706adfeade767d2194c9f39c0f75e944b0bdd23.zip |
Bluetooth: AMP: Get amp_mgr reference in HS hci_conn
When assigning amp_mgr in hci_conn (type AMP_LINK) get also reference.
In hci_conn_del those references would be put for both conn types
AMP_LINK and ACL_LINK associated with amp_mgr.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/a2mp.c')
-rw-r--r-- | net/bluetooth/a2mp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c index 7bf9a10d8e46..d5136cfb57e2 100644 --- a/net/bluetooth/a2mp.c +++ b/net/bluetooth/a2mp.c @@ -751,11 +751,13 @@ static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn, bool locked) } /* AMP Manager functions */ -void amp_mgr_get(struct amp_mgr *mgr) +struct amp_mgr *amp_mgr_get(struct amp_mgr *mgr) { BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount)); kref_get(&mgr->kref); + + return mgr; } static void amp_mgr_destroy(struct kref *kref) |