Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277662
b: refs/heads/master
c: 81b25cd
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan committed Oct 7, 2011
1 parent ab66c2f commit d2f1404
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 1785dbf9e30be62ab45e34900e574b8307bc98b5
refs/heads/master: 81b25cd04387fbceb76fe893db4863a380941413
14 changes: 8 additions & 6 deletions trunk/net/bluetooth/hidp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,18 +979,20 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
bacmp(&bt_sk(ctrl_sock->sk)->dst, &bt_sk(intr_sock->sk)->dst))
return -ENOTUNIQ;

session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL);
if (!session)
return -ENOMEM;

BT_DBG("rd_data %p rd_size %d", req->rd_data, req->rd_size);

down_write(&hidp_session_sem);

s = __hidp_get_session(&bt_sk(ctrl_sock->sk)->dst);
if (s && s->state == BT_CONNECTED) {
err = -EEXIST;
goto failed;
up_write(&hidp_session_sem);
return -EEXIST;
}

session = kzalloc(sizeof(struct hidp_session), GFP_KERNEL);
if (!session) {
up_write(&hidp_session_sem);
return -ENOMEM;
}

session->conn = hidp_find_connection(session);
Expand Down

0 comments on commit d2f1404

Please sign in to comment.