aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-04-24 10:48:54 +0100
committerRalf Baechle <ralf@linux-mips.org>2006-04-27 15:13:49 +0100
commit49e31ca8387227898710f99476f2217ea154aab0 (patch)
tree86fecdc0e3692c8e87c3a0eedc22eaf405b732e3
parent2be4d50295e2b6f62c07b614e1b103e280dddb84 (diff)
[MIPS] Fix oprofile module unloading
When unloading oprofile module with timer-mode, oprofile_arch_exit dereferences a NULL pointer. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/oprofile/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c
index 935dd851f48..49ef8fd338d 100644
--- a/arch/mips/oprofile/common.c
+++ b/arch/mips/oprofile/common.c
@@ -114,5 +114,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
void oprofile_arch_exit(void)
{
- model->exit();
+ if (model)
+ model->exit();
}