Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263529
b: refs/heads/master
c: e9d5cb5
h: refs/heads/master
i:
  263527: f7c0e32
v: v3
  • Loading branch information
Peter Hurley authored and Gustavo F. Padovan committed Aug 11, 2011
1 parent 46eab55 commit 62a7863
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 7176522cdca1f0b78a1434b41761f0334511822a
refs/heads/master: e9d5cb541b22aa651edc29990092ec5f8174cd39
14 changes: 6 additions & 8 deletions trunk/net/bluetooth/hidp/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,8 +1044,12 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
}

err = hid_add_device(session->hid);
if (err < 0)
goto err_add_device;
if (err < 0) {
atomic_inc(&session->terminate);
wake_up_process(session->task);
up_write(&hidp_session_sem);
return err;
}

if (session->input) {
hidp_send_ctrl_message(session,
Expand All @@ -1059,12 +1063,6 @@ int hidp_add_connection(struct hidp_connadd_req *req, struct socket *ctrl_sock,
up_write(&hidp_session_sem);
return 0;

err_add_device:
hid_destroy_device(session->hid);
session->hid = NULL;
atomic_inc(&session->terminate);
wake_up_process(session->task);

unlink:
hidp_del_timer(session);

Expand Down

0 comments on commit 62a7863

Please sign in to comment.