Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306940
b: refs/heads/master
c: ef191ad
h: refs/heads/master
v: v3
  • Loading branch information
Mat Martineau authored and Gustavo Padovan committed May 16, 2012
1 parent d1efbd6 commit a3bf875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 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: 35c84d76ee52f49fe2635d8cd686b5b658e8d892
refs/heads/master: ef191aded58c5e6860b01f463818584a420a4d6b
10 changes: 3 additions & 7 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,15 @@ static struct l2cap_chan *__l2cap_get_chan_by_scid(struct l2cap_conn *conn, u16
}

/* Find channel with given SCID.
* Returns locked socket */
* Returns locked channel. */
static struct l2cap_chan *l2cap_get_chan_by_scid(struct l2cap_conn *conn, u16 cid)
{
struct l2cap_chan *c;

mutex_lock(&conn->chan_lock);
c = __l2cap_get_chan_by_scid(conn, cid);
if (c)
l2cap_chan_lock(c);
mutex_unlock(&conn->chan_lock);

return c;
Expand Down Expand Up @@ -3183,8 +3185,6 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
if (!chan)
return -ENOENT;

l2cap_chan_lock(chan);

if (chan->state != BT_CONFIG && chan->state != BT_CONNECT2) {
struct l2cap_cmd_rej_cid rej;

Expand Down Expand Up @@ -3297,8 +3297,6 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr
if (!chan)
return 0;

l2cap_chan_lock(chan);

switch (result) {
case L2CAP_CONF_SUCCESS:
l2cap_conf_rfc_get(chan, rsp->data, len);
Expand Down Expand Up @@ -4631,8 +4629,6 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
return 0;
}

l2cap_chan_lock(chan);

BT_DBG("chan %p, len %d", chan, skb->len);

if (chan->state != BT_CONNECTED)
Expand Down

0 comments on commit a3bf875

Please sign in to comment.