From 49e31ca8387227898710f99476f2217ea154aab0 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 24 Apr 2006 10:48:54 +0100 Subject: [MIPS] Fix oprofile module unloading When unloading oprofile module with timer-mode, oprofile_arch_exit dereferences a NULL pointer. Signed-off-by: Atsushi Nemoto Signed-off-by: Ralf Baechle --- arch/mips/oprofile/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/mips') diff --git a/arch/mips/oprofile/common.c b/arch/mips/oprofile/common.c index 935dd85..49ef8fd 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(); } -- cgit v1.1