summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/hwpmc/hwpmc_core.c6
-rw-r--r--sys/dev/hwpmc/hwpmc_intel.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/hwpmc/hwpmc_core.c b/sys/dev/hwpmc/hwpmc_core.c
index 7bef548..1aac3b9 100644
--- a/sys/dev/hwpmc/hwpmc_core.c
+++ b/sys/dev/hwpmc/hwpmc_core.c
@@ -2406,8 +2406,12 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu)
PMCDBG(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d",
md->pmd_cputype, maxcpu, ipa_version);
- if (ipa_version < 1 || ipa_version > 3) /* Unknown PMC architecture. */
+ if (ipa_version < 1 || ipa_version > 3) {
+ /* Unknown PMC architecture. */
+ printf("hwpc_core: unknown PMC architecture: %d\n",
+ ipa_version);
return (EPROGMISMATCH);
+ }
core_cputype = md->pmd_cputype;
diff --git a/sys/dev/hwpmc/hwpmc_intel.c b/sys/dev/hwpmc/hwpmc_intel.c
index 20f29dc..89fd0b1 100644
--- a/sys/dev/hwpmc/hwpmc_intel.c
+++ b/sys/dev/hwpmc/hwpmc_intel.c
@@ -239,6 +239,9 @@ pmc_intel_initialize(void)
KASSERT(0, ("[intel,%d] Unknown CPU type", __LINE__));
}
+ if (error)
+ goto error;
+
/*
* Init the uncore class.
*/
OpenPOWER on IntegriCloud