diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2011-06-17 21:46:27 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-06-20 15:32:11 -0400 |
commit | e13e21dc5d06bd9ed4a88daf057b8dbe80c220de (patch) | |
tree | b1d6e187912fa8f2f06dd92333a507a3264b8845 /net | |
parent | 6312845169e8719f6f0726efc62bc6a8dedea9d3 (diff) |
Bluetooth: Remove useless access to the socket
We already have access to the chan, we don't have to access the
socket to get its imtu.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index b8c1df2035e..700d01e3d5b 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -3965,7 +3965,7 @@ static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, str | |||
3965 | if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) | 3965 | if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) |
3966 | goto drop; | 3966 | goto drop; |
3967 | 3967 | ||
3968 | if (l2cap_pi(sk)->chan->imtu < skb->len) | 3968 | if (chan->imtu < skb->len) |
3969 | goto drop; | 3969 | goto drop; |
3970 | 3970 | ||
3971 | if (!chan->ops->recv(chan->data, skb)) | 3971 | if (!chan->ops->recv(chan->data, skb)) |
@@ -3998,7 +3998,7 @@ static inline int l2cap_att_channel(struct l2cap_conn *conn, __le16 cid, struct | |||
3998 | if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) | 3998 | if (chan->state != BT_BOUND && chan->state != BT_CONNECTED) |
3999 | goto drop; | 3999 | goto drop; |
4000 | 4000 | ||
4001 | if (l2cap_pi(sk)->chan->imtu < skb->len) | 4001 | if (chan->imtu < skb->len) |
4002 | goto drop; | 4002 | goto drop; |
4003 | 4003 | ||
4004 | if (!chan->ops->recv(chan->data, skb)) | 4004 | if (!chan->ops->recv(chan->data, skb)) |