From: Andrei Emeltchenko Date: Mon, 16 Apr 2012 13:32:04 +0000 (+0300) Subject: Bluetooth: Fix debug printing unallocated name X-Git-Tag: upstream/snapshot3+hdmi~7329^2~3^2~18^2^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d8b3a11623cf5203bc063927b6fc742625f1ebf;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Bluetooth: Fix debug printing unallocated name It does make sense to print hdev name after allocation. Signed-off-by: Andrei Emeltchenko Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index f7911e9..544c7e3 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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);