diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2015-06-26 02:27:55 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-06-26 14:00:21 -0400 |
commit | 7c258670ce655659a4c8d1013676c55e74d09ee7 (patch) | |
tree | b9c438426ebcb8dfae712a4d8236b7eaf6cdace7 /net/bluetooth | |
parent | 011cb197a84ed547c2b6b12a86adbeec1be0fdaf (diff) |
Bluetooth: hidp: Initialize list header of hidp session user
When new hidp session is created, list header in l2cap_user is
not initialized and this causes list_empty() to fail in
l2cap_register_user() even if l2cap_user list is empty.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Tested-by: Jörg Otte <jrg.otte@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hidp/core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c index 9070dfd6b4ad..f1a117f8cad2 100644 --- a/net/bluetooth/hidp/core.c +++ b/net/bluetooth/hidp/core.c | |||
@@ -915,6 +915,7 @@ static int hidp_session_new(struct hidp_session **out, const bdaddr_t *bdaddr, | |||
915 | session->conn = l2cap_conn_get(conn); | 915 | session->conn = l2cap_conn_get(conn); |
916 | session->user.probe = hidp_session_probe; | 916 | session->user.probe = hidp_session_probe; |
917 | session->user.remove = hidp_session_remove; | 917 | session->user.remove = hidp_session_remove; |
918 | INIT_LIST_HEAD(&session->user.list); | ||
918 | session->ctrl_sock = ctrl_sock; | 919 | session->ctrl_sock = ctrl_sock; |
919 | session->intr_sock = intr_sock; | 920 | session->intr_sock = intr_sock; |
920 | skb_queue_head_init(&session->ctrl_transmit); | 921 | skb_queue_head_init(&session->ctrl_transmit); |