summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/hci_bcm.c
diff options
context:
space:
mode:
authorChan-yeol Park <chanyeol.park@samsung.com>2015-06-17 15:10:39 +0300
committerMarcel Holtmann <marcel@holtmann.org>2015-06-17 15:21:08 +0300
commit3713416763dc03e9011a3146c42411189531446f (patch)
treea2409a72dfb3f71c29b23ca89ef8a91f3acd0cad /drivers/bluetooth/hci_bcm.c
parent30811fa663d7efa65ccec290b47a1f564485fcdd (diff)
downloadlinux-3713416763dc03e9011a3146c42411189531446f.tar.xz
Bluetooth: hci_uart: Fix dereferencing of ERR_PTR
If h4_recv_buf() return ERR_PTR instead sk_buff pointer, it should be cleared once PTR_ERR is completed for the further dereference such as h4_recv(), or h4_close(). Signed-off-by: Chan-yeol Park <chanyeol.park@samsung.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/hci_bcm.c')
-rw-r--r--drivers/bluetooth/hci_bcm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index e4d66b61cda0..aa3c9aca4cb4 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -188,6 +188,7 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
if (IS_ERR(bcm->rx_skb)) {
int err = PTR_ERR(bcm->rx_skb);
BT_ERR("%s: Frame reassembly failed (%d)", hu->hdev->name, err);
+ bcm->rx_skb = NULL;
return err;
}