diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 29398293d501..640423b4f411 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -1811,16 +1811,10 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid, | |||
1811 | goto done; | 1811 | goto done; |
1812 | } | 1812 | } |
1813 | 1813 | ||
1814 | if (hcon->type == LE_LINK) { | 1814 | if (cid && __l2cap_get_chan_by_dcid(conn, cid)) { |
1815 | err = 0; | 1815 | hci_conn_drop(hcon); |
1816 | 1816 | err = -EBUSY; | |
1817 | if (!list_empty(&conn->chan_l)) { | 1817 | goto done; |
1818 | err = -EBUSY; | ||
1819 | hci_conn_drop(hcon); | ||
1820 | } | ||
1821 | |||
1822 | if (err) | ||
1823 | goto done; | ||
1824 | } | 1818 | } |
1825 | 1819 | ||
1826 | /* Update source addr of the socket */ | 1820 | /* Update source addr of the socket */ |