diff options
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 3 |
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, | |||
2439 | int err; | 2439 | int err; |
2440 | struct sk_buff_head seg_queue; | 2440 | struct sk_buff_head seg_queue; |
2441 | 2441 | ||
2442 | if (!chan->conn) | ||
2443 | return -ENOTCONN; | ||
2444 | |||
2442 | /* Connectionless channel */ | 2445 | /* Connectionless channel */ |
2443 | if (chan->chan_type == L2CAP_CHAN_CONN_LESS) { | 2446 | if (chan->chan_type == L2CAP_CHAN_CONN_LESS) { |
2444 | skb = l2cap_create_connless_pdu(chan, msg, len, priority); | 2447 | skb = l2cap_create_connless_pdu(chan, msg, len, priority); |