summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2006-04-24 11:48:54 +0200
committerRalf Baechle <ralf@linux-mips.org>2006-04-27 16:13:49 +0200
commit49e31ca8387227898710f99476f2217ea154aab0 (patch)
tree86fecdc0e3692c8e87c3a0eedc22eaf405b732e3
parentLinux v2.6.17-rc3 (diff)
downloadlinux-49e31ca8387227898710f99476f2217ea154aab0.tar.xz
linux-49e31ca8387227898710f99476f2217ea154aab0.zip
[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 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();
}