From: Ralf Baechle Date: Fri, 9 Dec 2005 12:34:45 +0000 (+0000) Subject: MIPS: Oprofile: Print error message if the CPU happen to have no counters. X-Git-Tag: firefly_0821_release~39198^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9efeae9a5cae7e7bdacff666a1d689f5b2901c64;p=firefly-linux-kernel-4.4.55.git MIPS: Oprofile: Print error message if the CPU happen to have no counters. Signed-off-by: Ralf Baechle --- diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index a4a4aa99ab03..d97bbff031e5 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c @@ -180,8 +180,10 @@ static int __init mipsxx_init(void) int counters; counters = n_counters(); - if (counters == 0) + if (counters == 0) { + printk(KERN_ERR "Oprofile: CPU has no performance counters\n"); return -ENODEV; + } reset_counters(counters);