MIPS: cpu-probe: ingenic: Fix broken BUG_ON
[sfrench/cifs-2.6.git] / arch / mips / kernel / cpu-probe.c
index a07e66a6e063a46c76ed79d23d6a8b57e856aa77..6be23f205e7411f8b2ed28c984cd76de45461945 100644 (file)
@@ -2123,7 +2123,7 @@ static inline void cpu_probe_ingenic(struct cpuinfo_mips *c, unsigned int cpu)
 
        /* XBurst does not implement the CP0 counter. */
        c->options &= ~MIPS_CPU_COUNTER;
-       BUG_ON(!__builtin_constant_p(cpu_has_counter) || cpu_has_counter);
+       BUG_ON(__builtin_constant_p(cpu_has_counter) && cpu_has_counter);
 
        /* XBurst has virtually tagged icache */
        c->icache.flags |= MIPS_CACHE_VTAG;