diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2013-10-18 03:43:00 -0700 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2013-10-18 14:37:01 +0300 |
commit | 06ae3314e0f67a222944155904a792399038f8be (patch) | |
tree | 786c2fc6d7145b785c30c439a2cc44a13b452d77 /net/bluetooth/l2cap_core.c | |
parent | e71f41bc7f73ec7f2cb678b51ace47eb05dc6af1 (diff) | |
download | linux-06ae3314e0f67a222944155904a792399038f8be.tar.bz2 |
Bluetooth: Use hcon directly instead of conn->hcon where possible
When the HCI connection hcon is already dereferenced, then use hcon
directly instead of conn->hcon.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 763b7417dab7..97572970fba2 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -6399,8 +6399,7 @@ static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, if (hcon->type != ACL_LINK) goto drop; - chan = l2cap_global_chan_by_psm(0, psm, &conn->hcon->src, - &conn->hcon->dst); + chan = l2cap_global_chan_by_psm(0, psm, &hcon->src, &hcon->dst); if (!chan) goto drop; @@ -6413,7 +6412,7 @@ static void l2cap_conless_channel(struct l2cap_conn *conn, __le16 psm, goto drop; /* Store remote BD_ADDR and PSM for msg_name */ - bacpy(&bt_cb(skb)->bdaddr, &conn->hcon->dst); + bacpy(&bt_cb(skb)->bdaddr, &hcon->dst); bt_cb(skb)->psm = psm; if (!chan->ops->recv(chan, skb)) @@ -6433,7 +6432,7 @@ static void l2cap_att_channel(struct l2cap_conn *conn, goto drop; chan = l2cap_global_chan_by_scid(BT_CONNECTED, L2CAP_CID_ATT, - &conn->hcon->src, &conn->hcon->dst); + &hcon->src, &hcon->dst); if (!chan) goto drop; |