aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/cache-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/cache-debugfs.c')
-rw-r--r--arch/sh/mm/cache-debugfs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index 690ed010d002..52411462c409 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -126,25 +126,19 @@ static int __init cache_debugfs_init(void)
126{ 126{
127 struct dentry *dcache_dentry, *icache_dentry; 127 struct dentry *dcache_dentry, *icache_dentry;
128 128
129 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root, 129 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, arch_debugfs_dir,
130 (unsigned int *)CACHE_TYPE_DCACHE, 130 (unsigned int *)CACHE_TYPE_DCACHE,
131 &cache_debugfs_fops); 131 &cache_debugfs_fops);
132 if (!dcache_dentry) 132 if (!dcache_dentry)
133 return -ENOMEM; 133 return -ENOMEM;
134 if (IS_ERR(dcache_dentry))
135 return PTR_ERR(dcache_dentry);
136 134
137 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root, 135 icache_dentry = debugfs_create_file("icache", S_IRUSR, arch_debugfs_dir,
138 (unsigned int *)CACHE_TYPE_ICACHE, 136 (unsigned int *)CACHE_TYPE_ICACHE,
139 &cache_debugfs_fops); 137 &cache_debugfs_fops);
140 if (!icache_dentry) { 138 if (!icache_dentry) {
141 debugfs_remove(dcache_dentry); 139 debugfs_remove(dcache_dentry);
142 return -ENOMEM; 140 return -ENOMEM;
143 } 141 }
144 if (IS_ERR(icache_dentry)) {
145 debugfs_remove(dcache_dentry);
146 return PTR_ERR(icache_dentry);
147 }
148 142
149 return 0; 143 return 0;
150} 144}