فهرست منبع

[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>

Ralf Baechle 19 سال پیش
والد
کامیت
49e31ca838
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      arch/mips/oprofile/common.c

+ 2 - 1
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();
 }