Author: ian
Date: Thu Jun  6 15:18:23 2019
New Revision: 348740
URL: https://svnweb.freebsd.org/changeset/base/348740
Log:
  Don't refer to the cpu variable in a KASSERT before initializing it.

Modified:
  head/sys/dev/hwpmc/hwpmc_armv7.c

Modified: head/sys/dev/hwpmc/hwpmc_armv7.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_armv7.c    Thu Jun  6 15:11:36 2019        
(r348739)
+++ head/sys/dev/hwpmc/hwpmc_armv7.c    Thu Jun  6 15:18:23 2019        
(r348740)
@@ -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++) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to