summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-04-24 13:48:54 +0400
committerRalf Baechle <ralf@linux-mips.org>2006-04-27 18:13:49 +0400
commit49e31ca8387227898710f99476f2217ea154aab0 (patch)
tree86fecdc0e3692c8e87c3a0eedc22eaf405b732e3 /arch/mips
parent2be4d50295e2b6f62c07b614e1b103e280dddb84 (diff)
downloadlinux-49e31ca8387227898710f99476f2217ea154aab0.tar.xz
[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>
Diffstat (limited to 'arch/mips')
-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 935dd851f480..49ef8fd338d6 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();
}