diff options
| -rw-r--r-- | net/bluetooth/hidp/core.c | 1 | ||||
| -rw-r--r-- | net/bluetooth/l2cap_core.c | 4 |
2 files changed, 3 insertions, 2 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); |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 51594fb7b9e7..45fffa413642 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
| @@ -1634,7 +1634,7 @@ void l2cap_unregister_user(struct l2cap_conn *conn, struct l2cap_user *user) | |||
| 1634 | if (list_empty(&user->list)) | 1634 | if (list_empty(&user->list)) |
| 1635 | goto out_unlock; | 1635 | goto out_unlock; |
| 1636 | 1636 | ||
| 1637 | list_del(&user->list); | 1637 | list_del_init(&user->list); |
| 1638 | user->remove(conn, user); | 1638 | user->remove(conn, user); |
| 1639 | 1639 | ||
| 1640 | out_unlock: | 1640 | out_unlock: |
| @@ -1648,7 +1648,7 @@ static void l2cap_unregister_all_users(struct l2cap_conn *conn) | |||
| 1648 | 1648 | ||
| 1649 | while (!list_empty(&conn->users)) { | 1649 | while (!list_empty(&conn->users)) { |
| 1650 | user = list_first_entry(&conn->users, struct l2cap_user, list); | 1650 | user = list_first_entry(&conn->users, struct l2cap_user, list); |
| 1651 | list_del(&user->list); | 1651 | list_del_init(&user->list); |
| 1652 | user->remove(conn, user); | 1652 | user->remove(conn, user); |
| 1653 | } | 1653 | } |
| 1654 | } | 1654 | } |
