aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/x86/oprofile/nmi_int.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c
index ca6b33667f5..8f0e49b0a50 100644
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -750,12 +750,12 @@ int __init op_nmi_init(struct oprofile_operations *ops)
void op_nmi_exit(void)
{
- if (using_nmi) {
- exit_sysfs();
+ if (!using_nmi)
+ return;
+ exit_sysfs();
#ifdef CONFIG_SMP
- unregister_cpu_notifier(&oprofile_cpu_nb);
+ unregister_cpu_notifier(&oprofile_cpu_nb);
#endif
- }
if (model->exit)
model->exit();
}