summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-11-21 10:26:17 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-11-21 10:26:17 -0500
commit7acd71879ce408af2d2ca3cd3ec3a86d0667ceae (patch)
tree8332fdffc7980575268f902c1cffe37ee2587a4d /net/bluetooth/l2cap_core.c
parent68c6beb373955da0886d8f4f5995b3922ceda4be (diff)
parent3b1bace9960b0acbcb5d0ca194077f03df7cc2c0 (diff)
downloadblackbird-op-linux-7acd71879ce408af2d2ca3cd3ec3a86d0667ceae.tar.gz
blackbird-op-linux-7acd71879ce408af2d2ca3cd3ec3a86d0667ceae.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
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);
OpenPOWER on IntegriCloud