diff options
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 8dcea7726f8d..a5c015cadd55 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -1086,6 +1086,12 @@ static void set_connectable_complete(struct hci_dev *hdev, u8 status) | |||
1086 | if (!cmd) | 1086 | if (!cmd) |
1087 | goto unlock; | 1087 | goto unlock; |
1088 | 1088 | ||
1089 | if (status) { | ||
1090 | u8 mgmt_err = mgmt_status(status); | ||
1091 | cmd_status(cmd->sk, cmd->index, cmd->opcode, mgmt_err); | ||
1092 | goto remove_cmd; | ||
1093 | } | ||
1094 | |||
1089 | cp = cmd->param; | 1095 | cp = cmd->param; |
1090 | if (cp->val) | 1096 | if (cp->val) |
1091 | changed = !test_and_set_bit(HCI_CONNECTABLE, &hdev->dev_flags); | 1097 | changed = !test_and_set_bit(HCI_CONNECTABLE, &hdev->dev_flags); |
@@ -1097,6 +1103,7 @@ static void set_connectable_complete(struct hci_dev *hdev, u8 status) | |||
1097 | if (changed) | 1103 | if (changed) |
1098 | new_settings(hdev, cmd->sk); | 1104 | new_settings(hdev, cmd->sk); |
1099 | 1105 | ||
1106 | remove_cmd: | ||
1100 | mgmt_pending_remove(cmd); | 1107 | mgmt_pending_remove(cmd); |
1101 | 1108 | ||
1102 | unlock: | 1109 | unlock: |