diff options
Diffstat (limited to 'arch/sh/mm/tlb-debugfs.c')
-rw-r--r-- | arch/sh/mm/tlb-debugfs.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/sh/mm/tlb-debugfs.c b/arch/sh/mm/tlb-debugfs.c index 229bf75f28df..dea637a09246 100644 --- a/arch/sh/mm/tlb-debugfs.c +++ b/arch/sh/mm/tlb-debugfs.c | |||
@@ -151,15 +151,13 @@ static int __init tlb_debugfs_init(void) | |||
151 | { | 151 | { |
152 | struct dentry *itlb, *utlb; | 152 | struct dentry *itlb, *utlb; |
153 | 153 | ||
154 | itlb = debugfs_create_file("itlb", S_IRUSR, sh_debugfs_root, | 154 | itlb = debugfs_create_file("itlb", S_IRUSR, arch_debugfs_dir, |
155 | (unsigned int *)TLB_TYPE_ITLB, | 155 | (unsigned int *)TLB_TYPE_ITLB, |
156 | &tlb_debugfs_fops); | 156 | &tlb_debugfs_fops); |
157 | if (unlikely(!itlb)) | 157 | if (unlikely(!itlb)) |
158 | return -ENOMEM; | 158 | return -ENOMEM; |
159 | if (IS_ERR(itlb)) | ||
160 | return PTR_ERR(itlb); | ||
161 | 159 | ||
162 | utlb = debugfs_create_file("utlb", S_IRUSR, sh_debugfs_root, | 160 | utlb = debugfs_create_file("utlb", S_IRUSR, arch_debugfs_dir, |
163 | (unsigned int *)TLB_TYPE_UTLB, | 161 | (unsigned int *)TLB_TYPE_UTLB, |
164 | &tlb_debugfs_fops); | 162 | &tlb_debugfs_fops); |
165 | if (unlikely(!utlb)) { | 163 | if (unlikely(!utlb)) { |
@@ -167,11 +165,6 @@ static int __init tlb_debugfs_init(void) | |||
167 | return -ENOMEM; | 165 | return -ENOMEM; |
168 | } | 166 | } |
169 | 167 | ||
170 | if (IS_ERR(utlb)) { | ||
171 | debugfs_remove(itlb); | ||
172 | return PTR_ERR(utlb); | ||
173 | } | ||
174 | |||
175 | return 0; | 168 | return 0; |
176 | } | 169 | } |
177 | module_init(tlb_debugfs_init); | 170 | module_init(tlb_debugfs_init); |