From: Luiz Augusto von Dentz Date: Mon, 19 Sep 2022 17:57:00 +0000 (-0700) Subject: Bluetooth: hci_debugfs: Fix not checking conn->debugfs X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7096daba731eea262e0f7bf03453ceddcad89f70;p=linux.git Bluetooth: hci_debugfs: Fix not checking conn->debugfs hci_debugfs_create_conn shall check if conn->debugfs has already been created and don't attempt to overwrite it. Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index 902b40a90b912..3f401ec5bb0c6 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c @@ -1245,7 +1245,7 @@ void hci_debugfs_create_conn(struct hci_conn *conn) struct hci_dev *hdev = conn->hdev; char name[6]; - if (IS_ERR_OR_NULL(hdev->debugfs)) + if (IS_ERR_OR_NULL(hdev->debugfs) || conn->debugfs) return; snprintf(name, sizeof(name), "%u", conn->handle);