diff options
author | DoHyun Pyun <dh79.pyun@samsung.com> | 2019-07-04 09:18:21 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2019-07-04 03:58:10 +0000 |
commit | 09499eb15be25af1b0b59bdcdc5ceb2e6eda8585 (patch) | |
tree | c6978215cc6a838b25de4cbdb9a3a5699cf65e87 | |
parent | 5410fa1888028986cef4edfed467780a980be8c6 (diff) | |
download | linux-rpi3-09499eb15be25af1b0b59bdcdc5ceb2e6eda8585.tar.gz linux-rpi3-09499eb15be25af1b0b59bdcdc5ceb2e6eda8585.tar.bz2 linux-rpi3-09499eb15be25af1b0b59bdcdc5ceb2e6eda8585.zip |
Bluetooth: Fix the potential crash issue
There is a logic error in the event function. We should
check the callback function's parameter before calling.
Change-Id: I06a4a8c50317e5ec4ae8fe35e4b788105e090196
Fixes: bde01c80dd51 ("Bluetooth: Set le data length command and event")
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
-rw-r--r-- | net/bluetooth/hci_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 7b699e235cdd..de15177cce18 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -1765,11 +1765,11 @@ static void hci_le_data_length_changed_complete_evt(struct hci_dev *hdev, conn->tx_time = le16_to_cpu(ev->tx_time); conn->rx_len = le16_to_cpu(ev->rx_len); conn->rx_time = le16_to_cpu(ev->rx_time); - } - mgmt_le_data_length_change_complete(hdev, &conn->dst, + mgmt_le_data_length_change_complete(hdev, &conn->dst, conn->tx_len, conn->tx_time, conn->rx_len, conn->rx_time); + } hci_dev_unlock(hdev); } |