提交 2d8b3a11 编写于 作者: A Andrei Emeltchenko 提交者: Gustavo Padovan

Bluetooth: Fix debug printing unallocated name

It does make sense to print hdev name after allocation.
Signed-off-by: NAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 e4787220
...@@ -1741,8 +1741,6 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -1741,8 +1741,6 @@ int hci_register_dev(struct hci_dev *hdev)
struct list_head *head = &hci_dev_list, *p; struct list_head *head = &hci_dev_list, *p;
int i, id, error; int i, id, error;
BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
if (!hdev->open || !hdev->close) if (!hdev->open || !hdev->close)
return -EINVAL; return -EINVAL;
...@@ -1762,6 +1760,9 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -1762,6 +1760,9 @@ int hci_register_dev(struct hci_dev *hdev)
sprintf(hdev->name, "hci%d", id); sprintf(hdev->name, "hci%d", id);
hdev->id = id; hdev->id = id;
BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);
list_add_tail(&hdev->list, head); list_add_tail(&hdev->list, head);
mutex_init(&hdev->lock); mutex_init(&hdev->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册