diff options
author | Chan-yeol Park <chanyeol.park@samsung.com> | 2015-06-17 14:10:39 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-06-17 14:21:08 +0200 |
commit | 3713416763dc03e9011a3146c42411189531446f (patch) | |
tree | a2409a72dfb3f71c29b23ca89ef8a91f3acd0cad /drivers/bluetooth/hci_ath.c | |
parent | at86rf230: cleanup start and stop callbacks (diff) | |
download | linux-3713416763dc03e9011a3146c42411189531446f.tar.xz linux-3713416763dc03e9011a3146c42411189531446f.zip |
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_ath.c')
-rw-r--r-- | drivers/bluetooth/hci_ath.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/hci_ath.c b/drivers/bluetooth/hci_ath.c index ec8fa0e0f036..6da5e4ca13ea 100644 --- a/drivers/bluetooth/hci_ath.c +++ b/drivers/bluetooth/hci_ath.c @@ -192,6 +192,7 @@ static int ath_recv(struct hci_uart *hu, const void *data, int count) if (IS_ERR(ath->rx_skb)) { int err = PTR_ERR(ath->rx_skb); BT_ERR("%s: Frame reassembly failed (%d)", hu->hdev->name, err); + ath->rx_skb = NULL; return err; } |