diff options
-rw-r--r-- | net/bluetooth/hci_core.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 1f691c50abbc..9eb2869b183b 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1926,6 +1926,8 @@ static int __hci_init(struct hci_dev *hdev) | |||
1926 | debugfs_create_u16("discov_interleaved_timeout", 0644, | 1926 | debugfs_create_u16("discov_interleaved_timeout", 0644, |
1927 | hdev->debugfs, | 1927 | hdev->debugfs, |
1928 | &hdev->discov_interleaved_timeout); | 1928 | &hdev->discov_interleaved_timeout); |
1929 | |||
1930 | hci_register_smp(hdev); | ||
1929 | } | 1931 | } |
1930 | 1932 | ||
1931 | return 0; | 1933 | return 0; |
@@ -4127,13 +4129,9 @@ int hci_register_dev(struct hci_dev *hdev) | |||
4127 | 4129 | ||
4128 | dev_set_name(&hdev->dev, "%s", hdev->name); | 4130 | dev_set_name(&hdev->dev, "%s", hdev->name); |
4129 | 4131 | ||
4130 | error = hci_register_smp(hdev); | ||
4131 | if (error) | ||
4132 | goto err_wqueue; | ||
4133 | |||
4134 | error = device_add(&hdev->dev); | 4132 | error = device_add(&hdev->dev); |
4135 | if (error < 0) | 4133 | if (error < 0) |
4136 | goto err_smp; | 4134 | goto err_wqueue; |
4137 | 4135 | ||
4138 | hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev, | 4136 | hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev, |
4139 | RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops, | 4137 | RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops, |
@@ -4175,8 +4173,6 @@ int hci_register_dev(struct hci_dev *hdev) | |||
4175 | 4173 | ||
4176 | return id; | 4174 | return id; |
4177 | 4175 | ||
4178 | err_smp: | ||
4179 | hci_unregister_smp(hdev); | ||
4180 | err_wqueue: | 4176 | err_wqueue: |
4181 | destroy_workqueue(hdev->workqueue); | 4177 | destroy_workqueue(hdev->workqueue); |
4182 | destroy_workqueue(hdev->req_workqueue); | 4178 | destroy_workqueue(hdev->req_workqueue); |