debugfs_create_u16("discov_interleaved_timeout", 0644,
hdev->debugfs,
&hdev->discov_interleaved_timeout);
+
+ hci_register_smp(hdev);
}
return 0;
dev_set_name(&hdev->dev, "%s", hdev->name);
- error = hci_register_smp(hdev);
- if (error)
- goto err_wqueue;
-
error = device_add(&hdev->dev);
if (error < 0)
- goto err_smp;
+ goto err_wqueue;
hdev->rfkill = rfkill_alloc(hdev->name, &hdev->dev,
RFKILL_TYPE_BLUETOOTH, &hci_rfkill_ops,
return id;
-err_smp:
- hci_unregister_smp(hdev);
err_wqueue:
destroy_workqueue(hdev->workqueue);
destroy_workqueue(hdev->req_workqueue);