summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_ldisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth/hci_ldisc.c')
-rw-r--r--drivers/bluetooth/hci_ldisc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 0d4da5e14ba0..b3f01996318f 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -355,7 +355,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty)
* flags pointer to flags for data
* count count of received data in bytes
*
- * Return Value: None
+ * Return Value: Number of bytes received
*/
static unsigned int hci_uart_tty_receive(struct tty_struct *tty,
const u8 *data, char *flags, int count)
@@ -371,7 +371,8 @@ static unsigned int hci_uart_tty_receive(struct tty_struct *tty,
spin_lock(&hu->rx_lock);
received = hu->proto->recv(hu, (void *) data, count);
- hu->hdev->stat.byte_rx += count;
+ if (received > 0)
+ hu->hdev->stat.byte_rx += received;
spin_unlock(&hu->rx_lock);
tty_unthrottle(tty);