[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>
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 @@
 
 void oprofile_arch_exit(void)
 {
-	model->exit();
+	if (model)
+		model->exit();
 }