diff options
Diffstat (limited to 'net/bluetooth/rfcomm/core.c')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 27e936a7ddd9..94d06cbfbc18 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -2154,13 +2154,6 @@ static int __init rfcomm_init(void) | |||
2154 | goto unregister; | 2154 | goto unregister; |
2155 | } | 2155 | } |
2156 | 2156 | ||
2157 | if (bt_debugfs) { | ||
2158 | rfcomm_dlc_debugfs = debugfs_create_file("rfcomm_dlc", 0444, | ||
2159 | bt_debugfs, NULL, &rfcomm_dlc_debugfs_fops); | ||
2160 | if (!rfcomm_dlc_debugfs) | ||
2161 | BT_ERR("Failed to create RFCOMM debug file"); | ||
2162 | } | ||
2163 | |||
2164 | err = rfcomm_init_ttys(); | 2157 | err = rfcomm_init_ttys(); |
2165 | if (err < 0) | 2158 | if (err < 0) |
2166 | goto stop; | 2159 | goto stop; |
@@ -2171,6 +2164,13 @@ static int __init rfcomm_init(void) | |||
2171 | 2164 | ||
2172 | BT_INFO("RFCOMM ver %s", VERSION); | 2165 | BT_INFO("RFCOMM ver %s", VERSION); |
2173 | 2166 | ||
2167 | if (IS_ERR_OR_NULL(bt_debugfs)) | ||
2168 | return 0; | ||
2169 | |||
2170 | rfcomm_dlc_debugfs = debugfs_create_file("rfcomm_dlc", 0444, | ||
2171 | bt_debugfs, NULL, | ||
2172 | &rfcomm_dlc_debugfs_fops); | ||
2173 | |||
2174 | return 0; | 2174 | return 0; |
2175 | 2175 | ||
2176 | cleanup: | 2176 | cleanup: |