diff options
| -rw-r--r-- | net/bluetooth/l2cap_core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 843463ecd7bc..1557c3c774f1 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
| @@ -1340,7 +1340,7 @@ static struct l2cap_chan *l2cap_global_chan_by_scid(int state, u16 cid, | |||
| 1340 | 1340 | ||
| 1341 | static void l2cap_le_conn_ready(struct l2cap_conn *conn) | 1341 | static void l2cap_le_conn_ready(struct l2cap_conn *conn) |
| 1342 | { | 1342 | { |
| 1343 | struct sock *parent, *sk; | 1343 | struct sock *parent; |
| 1344 | struct l2cap_chan *chan, *pchan; | 1344 | struct l2cap_chan *chan, *pchan; |
| 1345 | 1345 | ||
| 1346 | BT_DBG(""); | 1346 | BT_DBG(""); |
| @@ -1361,13 +1361,11 @@ static void l2cap_le_conn_ready(struct l2cap_conn *conn) | |||
| 1361 | 1361 | ||
| 1362 | chan->dcid = L2CAP_CID_ATT; | 1362 | chan->dcid = L2CAP_CID_ATT; |
| 1363 | 1363 | ||
| 1364 | sk = chan->sk; | ||
| 1365 | |||
| 1366 | hci_conn_hold(conn->hcon); | 1364 | hci_conn_hold(conn->hcon); |
| 1367 | conn->hcon->disc_timeout = HCI_DISCONN_TIMEOUT; | 1365 | conn->hcon->disc_timeout = HCI_DISCONN_TIMEOUT; |
| 1368 | 1366 | ||
| 1369 | bacpy(&bt_sk(sk)->src, conn->src); | 1367 | bacpy(&bt_sk(chan->sk)->src, conn->src); |
| 1370 | bacpy(&bt_sk(sk)->dst, conn->dst); | 1368 | bacpy(&bt_sk(chan->sk)->dst, conn->dst); |
| 1371 | 1369 | ||
| 1372 | l2cap_chan_add(conn, chan); | 1370 | l2cap_chan_add(conn, chan); |
| 1373 | 1371 | ||
