Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277690
b: refs/heads/master
c: 56b7d13
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan committed Oct 14, 2011
1 parent c7f5f24 commit 085b692
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 33ca954daf1ac03c86237b73235d8b0856d84981
refs/heads/master: 56b7d137855eb02cba8aecbb67d49c24b43644b0
12 changes: 8 additions & 4 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static int cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status)
struct sk_buff *skb;
struct mgmt_hdr *hdr;
struct mgmt_ev_cmd_status *ev;
int err;

BT_DBG("sock %p, index %u, cmd %u, status %u", sk, index, cmd, status);

Expand All @@ -65,10 +66,11 @@ static int cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status)
ev->status = status;
put_unaligned_le16(cmd, &ev->opcode);

if (sock_queue_rcv_skb(sk, skb) < 0)
err = sock_queue_rcv_skb(sk, skb);
if (err < 0)
kfree_skb(skb);

return 0;
return err;
}

static int cmd_complete(struct sock *sk, u16 index, u16 cmd, void *rp,
Expand All @@ -77,6 +79,7 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, void *rp,
struct sk_buff *skb;
struct mgmt_hdr *hdr;
struct mgmt_ev_cmd_complete *ev;
int err;

BT_DBG("sock %p", sk);

Expand All @@ -96,10 +99,11 @@ static int cmd_complete(struct sock *sk, u16 index, u16 cmd, void *rp,
if (rp)
memcpy(ev->data, rp, rp_len);

if (sock_queue_rcv_skb(sk, skb) < 0)
err = sock_queue_rcv_skb(sk, skb);
if (err < 0)
kfree_skb(skb);

return 0;
return err;;
}

static int read_version(struct sock *sk)
Expand Down

0 comments on commit 085b692

Please sign in to comment.