Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: mgmt: add mgmt_cmd_status in add_advertising

If an error occurs during request building in add_advertising(),
remember to send MGMT_STATUS_FAILED command status back to bluetoothd.

Signed-off-by: Joseph Hwang <josephsih@chromium.org>
Signed-off-by: Manish Mandlik <mmandlik@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Joseph Hwang and committed by
Marcel Holtmann
72da7b2c 8a595619

+4 -1
+4 -1
net/bluetooth/mgmt.c
··· 6807 6807 if (!err) 6808 6808 err = hci_req_run(&req, add_advertising_complete); 6809 6809 6810 - if (err < 0) 6810 + if (err < 0) { 6811 + err = mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING, 6812 + MGMT_STATUS_FAILED); 6811 6813 mgmt_pending_remove(cmd); 6814 + } 6812 6815 6813 6816 unlock: 6814 6817 hci_dev_unlock(hdev);