summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_h4.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-04-22 14:56:41 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-22 14:56:41 -0400
commite563589f7187699b0217854467d857f53b29cc50 (patch)
treec6ff538f85ba5496da39b9d1789db761f58e803a /drivers/bluetooth/hci_h4.c
parent197bbf0aedfb81ab70247264883c81e7f7d503ba (diff)
parent76a388beaf92cc75b829d4a0b7d69afaaeaa4b0a (diff)
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'drivers/bluetooth/hci_h4.c')
-rw-r--r--drivers/bluetooth/hci_h4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index c60623f206d4..8ae9f1ea2bb5 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -153,6 +153,9 @@ static int h4_recv(struct hci_uart *hu, void *data, int count)
{
int ret;
+ if (!test_bit(HCI_UART_REGISTERED, &hu->flags))
+ return -EUNATCH;
+
ret = hci_recv_stream_fragment(hu->hdev, data, count);
if (ret < 0) {
BT_ERR("Frame Reassembly Failed");