aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0176f200ccb0..48e1e0438f3a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3442,8 +3442,16 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status)
3442 */ 3442 */
3443 if (hdev->sent_cmd) { 3443 if (hdev->sent_cmd) {
3444 req_complete = bt_cb(hdev->sent_cmd)->req.complete; 3444 req_complete = bt_cb(hdev->sent_cmd)->req.complete;
3445 if (req_complete) 3445
3446 if (req_complete) {
3447 /* We must set the complete callback to NULL to
3448 * avoid calling the callback more than once if
3449 * this function gets called again.
3450 */
3451 bt_cb(hdev->sent_cmd)->req.complete = NULL;
3452
3446 goto call_complete; 3453 goto call_complete;
3454 }
3447 } 3455 }
3448 3456
3449 /* Remove all pending commands belonging to this request */ 3457 /* Remove all pending commands belonging to this request */