Skip to content

Commit

Permalink
Bluetooth: Fix debug printing unallocated name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed May 9, 2012
1 parent e478722 commit 2d8b3a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1741,8 +1741,6 @@ int hci_register_dev(struct hci_dev *hdev)
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;

Expand All @@ -1762,6 +1760,9 @@ int hci_register_dev(struct hci_dev *hdev)

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);
Expand Down

0 comments on commit 2d8b3a1

Please sign in to comment.