It does make sense to print hdev name after allocation.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
struct list_head *head = &hci_dev_list, *p;
int i, id, error;
- BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
-
if (!hdev->open || !hdev->close)
return -EINVAL;
sprintf(hdev->name, "hci%d", id);
hdev->id = id;
+
+ BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
+
list_add_tail(&hdev->list, head);
mutex_init(&hdev->lock);