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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index 0e189ccd4a77..5ba067b26591 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -130,12 +130,18 @@ static int __init cache_debugfs_init(void)
130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root, 130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root,
131 (unsigned int *)CACHE_TYPE_DCACHE, 131 (unsigned int *)CACHE_TYPE_DCACHE,
132 &cache_debugfs_fops); 132 &cache_debugfs_fops);
133 if (!dcache_dentry)
134 return -ENOMEM;
133 if (IS_ERR(dcache_dentry)) 135 if (IS_ERR(dcache_dentry))
134 return PTR_ERR(dcache_dentry); 136 return PTR_ERR(dcache_dentry);
135 137
136 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root, 138 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root,
137 (unsigned int *)CACHE_TYPE_ICACHE, 139 (unsigned int *)CACHE_TYPE_ICACHE,
138 &cache_debugfs_fops); 140 &cache_debugfs_fops);
141 if (!icache_dentry) {
142 debugfs_remove(dcache_dentry);
143 return -ENOMEM;
144 }
139 if (IS_ERR(icache_dentry)) { 145 if (IS_ERR(icache_dentry)) {
140 debugfs_remove(dcache_dentry); 146 debugfs_remove(dcache_dentry);
141 return PTR_ERR(icache_dentry); 147 return PTR_ERR(icache_dentry);