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

This commit is contained in:
Ian Lepore 2019-06-06 15:18:23 +00:00
parent 46f8169aea
commit fbc27301ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=348740

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++) {