diff options
Diffstat (limited to 'net/bluetooth/sco.c')
-rw-r--r-- | net/bluetooth/sco.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 0ef5a78a889f..caa109df6452 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -1023,6 +1023,13 @@ int __init sco_init(void) | |||
1023 | goto error; | 1023 | goto error; |
1024 | } | 1024 | } |
1025 | 1025 | ||
1026 | err = bt_procfs_init(THIS_MODULE, &init_net, "sco", &sco_sk_list, NULL); | ||
1027 | if (err < 0) { | ||
1028 | BT_ERR("Failed to create SCO proc file"); | ||
1029 | bt_sock_unregister(BTPROTO_SCO); | ||
1030 | goto error; | ||
1031 | } | ||
1032 | |||
1026 | if (bt_debugfs) { | 1033 | if (bt_debugfs) { |
1027 | sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, | 1034 | sco_debugfs = debugfs_create_file("sco", 0444, bt_debugfs, |
1028 | NULL, &sco_debugfs_fops); | 1035 | NULL, &sco_debugfs_fops); |
@@ -1041,6 +1048,8 @@ error: | |||
1041 | 1048 | ||
1042 | void __exit sco_exit(void) | 1049 | void __exit sco_exit(void) |
1043 | { | 1050 | { |
1051 | bt_procfs_cleanup(&init_net, "sco"); | ||
1052 | |||
1044 | debugfs_remove(sco_debugfs); | 1053 | debugfs_remove(sco_debugfs); |
1045 | 1054 | ||
1046 | if (bt_sock_unregister(BTPROTO_SCO) < 0) | 1055 | if (bt_sock_unregister(BTPROTO_SCO) < 0) |