From: Ralf Baechle Date: Mon, 24 Apr 2006 09:48:54 +0000 (+0100) Subject: [MIPS] Fix oprofile module unloading X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49e31ca8387227898710f99476f2217ea154aab0;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [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 --- 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(); }