Skip to content

Commit

Permalink
Bluetooth: hci_debugfs: Fix not checking conn->debugfs
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Vudentz committed Sep 21, 2022
1 parent 448a496 commit 7096dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7096dab

Please sign in to comment.