]> git.karo-electronics.de Git - linux-beck.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)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 9 May 2012 04:40:35 +0000 (01:40 -0300)
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 f7911e9224c5225113df5e737fb2c2b888ca8df0..544c7e3a40d27963fe2c3e580612a29d0dc83ca1 100644 (file)
@@ -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;
 
@@ -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);