Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[sfrench/cifs-2.6.git] / drivers / perf / arm_cspmu / arm_cspmu.c
index 42b72042f6b3759d2d1cbfd57d1268d070b584ae..2cc35dded0079f9f3a59289e476fd1f579114556 100644 (file)
@@ -676,6 +676,9 @@ static int arm_cspmu_event_init(struct perf_event *event)
 
        cspmu = to_arm_cspmu(event->pmu);
 
+       if (event->attr.type != event->pmu->type)
+               return -ENOENT;
+
        /*
         * Following other "uncore" PMUs, we do not support sampling mode or
         * attach to a task (per-process mode).