Author: mmacy
Date: Mon Jun  4 04:49:06 2018
New Revision: 334598
URL: https://svnweb.freebsd.org/changeset/base/334598

Log:
  hwpmc: fix fixed counters checks

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

Modified: head/sys/dev/hwpmc/hwpmc_core.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_core.c     Mon Jun  4 03:16:24 2018        
(r334597)
+++ head/sys/dev/hwpmc/hwpmc_core.c     Mon Jun  4 04:49:06 2018        
(r334598)
@@ -251,13 +251,12 @@ iaf_allocate_pmc(int cpu, int ri, struct pmc *pm,
        if (ev == 0xC0 && ri != 0)
                return (EINVAL);
        /* CPU_CLK_UNHALTED.THREAD */
-       else if (ev == 0x3C && ri != 1)
+       if (ev == 0x3C && ri != 1)
                return (EINVAL);
        /* CPU_CLK_UNHALTED.REF */
-       else if (ev == 0x0 && umask == 0x3 && ri != 2)
+       if (ev == 0x0 && umask == 0x3 && ri != 2)
                return (EINVAL);
-       else
-               return (EINVAL);
+
 
        flags = 0;
        if (config & IAP_OS)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to