diff options
Diffstat (limited to 'drivers/perf/arm_spe_pmu.c')
-rw-r--r-- | drivers/perf/arm_spe_pmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c index 54ec278d2fc4..8e46a9dad2fa 100644 --- a/drivers/perf/arm_spe_pmu.c +++ b/drivers/perf/arm_spe_pmu.c @@ -927,6 +927,11 @@ static int arm_spe_pmu_perf_init(struct arm_spe_pmu *spe_pmu) idx = atomic_inc_return(&pmu_idx); name = devm_kasprintf(dev, GFP_KERNEL, "%s_%d", PMUNAME, idx); + if (!name) { + dev_err(dev, "failed to allocate name for pmu %d\n", idx); + return -ENOMEM; + } + return perf_pmu_register(&spe_pmu->pmu, name, -1); } @@ -1169,6 +1174,7 @@ static const struct of_device_id arm_spe_pmu_of_match[] = { { .compatible = "arm,statistical-profiling-extension-v1", .data = (void *)1 }, { /* Sentinel */ }, }; +MODULE_DEVICE_TABLE(of, arm_spe_pmu_of_match); static int arm_spe_pmu_device_dt_probe(struct platform_device *pdev) { |