Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277721
b: refs/heads/master
c: 3c32fa9
h: refs/heads/master
i:
  277719: 5ff281c
v: v3
  • Loading branch information
Gustavo F. Padovan committed Nov 7, 2011
1 parent 56fe3ca commit d396c5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25df0845e054f70a8735ee0184739472d8a573c9
refs/heads/master: 3c32fa93e5a54cd54e52541892857b0c7164a61e
12 changes: 6 additions & 6 deletions trunk/net/bluetooth/hidp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,12 +996,6 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
return -ENOMEM;
}

session->conn = hidp_get_connection(session);
if (!session->conn) {
err = -ENOTCONN;
goto failed;
}

bacpy(&session->bdaddr, &bt_sk(ctrl_sock->sk)->dst);

session->ctrl_mtu = min_t(uint, l2cap_pi(ctrl_sock->sk)->chan->omtu,
Expand All @@ -1015,6 +1009,12 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
session->intr_sock = intr_sock;
session->state = BT_CONNECTED;

session->conn = hidp_get_connection(session);
if (!session->conn) {
err = -ENOTCONN;
goto failed;
}

setup_timer(&session->timer, hidp_idle_timeout, (unsigned long)session);

skb_queue_head_init(&session->ctrl_transmit);
Expand Down

0 comments on commit d396c5d

Please sign in to comment.