diff --git a/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c b/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c index f493cd61..8788a451 100644 --- a/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c +++ b/drivers/platform/tegra/uncore_pmu/tegra23x_perf_uncore.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -// SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// SPDX-FileCopyrightText: Copyright (c) 2022-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. #include @@ -500,6 +500,9 @@ static int scf_uncore_event_init(struct perf_event *event) uncore_pmu = to_uncore_pmu(event->pmu); pdev = uncore_pmu->pdev; + if (event->attr.type != event->pmu->type) + return -ENOENT; + /* * The uncore counters are shared by all CPU cores. Therefore it does not * support sampling mode or attach to a task (per-process mode).