MIPS: Oprofile: Print error message if the CPU happen to have no counters.
Ralf Baechle [Fri, 9 Dec 2005 12:34:45 +0000 (12:34 +0000)]
Signed-off-by: Ralf Baechle <ralf@ongar.mips.com>

arch/mips/oprofile/op_model_mipsxx.c

index a4a4aa9..d97bbff 100644 (file)
@@ -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);