summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2016-09-26 10:31:52 +0200
committerIngo Molnar <mingo@kernel.org>2016-09-26 11:13:17 +0200
commitb199ac6c4943aa0db246163bf6b483e2bb53431b (patch)
tree9482f9411e49e241aedd4a5b78fdbda7b2dc1531 /arch/x86
parentx86/RAS/mce_amd_inj: Fix signed wrap around when decrementing index 'i' (diff)
downloadlinux-b199ac6c4943aa0db246163bf6b483e2bb53431b.tar.xz
linux-b199ac6c4943aa0db246163bf6b483e2bb53431b.zip
x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit
Simplify exit_mce_inject() by using debugfs_remove_recursive() and do away with the noodling over the dentry elements. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20160926083152.30848-3-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/ras/mce_amd_inj.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/x86/ras/mce_amd_inj.c b/arch/x86/ras/mce_amd_inj.c
index 20b227f63407..1ac76479c266 100644
--- a/arch/x86/ras/mce_amd_inj.c
+++ b/arch/x86/ras/mce_amd_inj.c
@@ -475,15 +475,11 @@ err_dfs_add:
static void __exit exit_mce_inject(void)
{
- int i;
- for (i = 0; i < ARRAY_SIZE(dfs_fls); i++)
- debugfs_remove(dfs_fls[i].d);
+ debugfs_remove_recursive(dfs_inj);
+ dfs_inj = NULL;
memset(&dfs_fls, 0, sizeof(dfs_fls));
-
- debugfs_remove(dfs_inj);
- dfs_inj = NULL;
}
module_init(init_mce_inject);
module_exit(exit_mce_inject);