From: Vinicius Costa Gomes Date: Sat, 18 Jun 2011 01:46:27 +0000 (-0300) Subject: Bluetooth: Remove useless access to the socket X-Git-Tag: firefly_0821_release~7613^2~479 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=43d669e7b68bcf491fbf0fab0a7d7f1536d85fca;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index be06c269a968..19f4e8dbd46d 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))