diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-05-01 16:15:34 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-05-10 09:28:45 +0200 |
commit | fe1aff710756ac73c455d214845c74e304d0e966 (patch) | |
tree | b561c36d75a6b190ba95aab5b5234913af844d74 /drivers/bluetooth/hci_h4.c | |
parent | 3ee943728fff536edaf8f59faa58aaa1aa7366e3 (diff) |
Bluetooth: Fix return value when bt_skb_alloc fails
Set the proper error(ENOMEM), instead of just return 0.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_h4.c')
-rw-r--r-- | drivers/bluetooth/hci_h4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c index c0ce8134814e..3f038f5308a4 100644 --- a/drivers/bluetooth/hci_h4.c +++ b/drivers/bluetooth/hci_h4.c @@ -246,7 +246,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count) BT_ERR("Can't allocate mem for new packet"); h4->rx_state = H4_W4_PACKET_TYPE; h4->rx_count = 0; - return 0; + return -ENOMEM; } h4->rx_skb->dev = (void *) hu->hdev; |