Don't refer to the cpu variable in a KASSERT before initializing it.

This commit is contained in:
ian 2019-06-06 15:18:23 +00:00
parent e0dae39851
commit 3c8e6f0701

View File

@ -315,11 +315,11 @@ armv7_intr(struct trapframe *tf)
int error;
int reg, cpu;
cpu = curcpu;
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
("[armv7,%d] CPU %d out of range", __LINE__, cpu));
retval = 0;
cpu = curcpu;
pc = armv7_pcpu[cpu];
for (ri = 0; ri < armv7_npmcs; ri++) {