]> git.baikalelectronics.ru Git - kernel.git/commit
perf/marvell_cn10k: Fix tad_pmu_event_init() to check pmu type first
authorTanmay Jagdale <tanmay@marvell.com>
Tue, 10 May 2022 10:26:57 +0000 (15:56 +0530)
committerWill Deacon <will@kernel.org>
Tue, 10 May 2022 11:14:27 +0000 (12:14 +0100)
commit9037d9c243e3b058cc12a193481668fe95d85b24
tree2683cfe1750bab8b6c6c37841fc6dd32007a26a7
parent2db9da78ada22f8dbae02cff7a6ba5121001a90f
perf/marvell_cn10k: Fix tad_pmu_event_init() to check pmu type first

Make sure to check the pmu type first and then check event->attr.disabled.
Doing so would avoid reading the disabled attribute of an event that is
not handled by TAD PMU.

Signed-off-by: Tanmay Jagdale <tanmay@marvell.com>
Link: https://lore.kernel.org/r/20220510102657.487539-1-tanmay@marvell.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/marvell_cn10k_tad_pmu.c