]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Fix debug printing unallocated name
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Mon, 16 Apr 2012 13:32:04 +0000 (16:32 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 16 Apr 2012 13:40:32 +0000 (15:40 +0200)
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>
net/bluetooth/hci_core.c

index 26a6efc3296637ad937b1a96506d1f2dee5d778b..c4dc263424f96232286d56fd919d3dae40251b0d 100644 (file)
@@ -1742,8 +1742,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;
 
@@ -1763,6 +1761,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);