summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-11-15 14:18:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-15 14:18:45 -0500
commit32019c739c95d056575e0bb2381f2846c0c49944 (patch)
treea3134c8c8c74094b936b73906954c7e77f531cf9 /net/bluetooth/l2cap_core.c
parent8e3ffa471091c560deb6738ed9ab7445b7a5fd04 (diff)
parent86ca9eac31d0d8c4fe61b5726e6d63197bc435a6 (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 0cef67707838..4af3821df880 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -2439,6 +2439,9 @@ int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len,
int err;
struct sk_buff_head seg_queue;
+ if (!chan->conn)
+ return -ENOTCONN;
+
/* Connectionless channel */
if (chan->chan_type == L2CAP_CHAN_CONN_LESS) {
skb = l2cap_create_connless_pdu(chan, msg, len, priority);