Bluetooth: Remove useless access to the socket
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Sat, 18 Jun 2011 01:46:27 +0000 (22:46 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Mon, 20 Jun 2011 19:32:11 +0000 (16:32 -0300)
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>
net/bluetooth/l2cap_core.c

index b8c1df2035ec6aa51543e17f04edbfbbcabe535a..700d01e3d5ba89287a204c5d7380d8af720354f5 100644 (file)
@@ -3965,7 +3965,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))
@@ -3998,7 +3998,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))