summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2011-06-17 22:46:27 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:25 -0700
commit43d669e7b68bcf491fbf0fab0a7d7f1536d85fca (patch)
treeece92c6391678ae54cb32d1b9aabda948c8b6d08 /net/bluetooth/l2cap_core.c
parent16af3daa4a1edc1dd4ccecb47a6ea6a2b2cc26f8 (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/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index be06c269a96..19f4e8dbd46 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -3966,7 +3966,7 @@ static inline int l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, str
if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
goto drop;
- if (l2cap_pi(sk)->chan->imtu < skb->len)
+ if (chan->imtu < skb->len)
goto drop;
if (!chan->ops->recv(chan->data, skb))
@@ -3999,7 +3999,7 @@ static inline int l2cap_att_channel(struct l2cap_conn *conn, __le16 cid, struct
if (chan->state != BT_BOUND && chan->state != BT_CONNECTED)
goto drop;
- if (l2cap_pi(sk)->chan->imtu < skb->len)
+ if (chan->imtu < skb->len)
goto drop;
if (!chan->ops->recv(chan->data, skb))