summaryrefslogtreecommitdiffstats
path: root/drivers/perf/arm_dsu_pmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/perf/arm_dsu_pmu.c')
-rw-r--r--drivers/perf/arm_dsu_pmu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/perf/arm_dsu_pmu.c b/drivers/perf/arm_dsu_pmu.c
index 660cb8ac8..961533ba3 100644
--- a/drivers/perf/arm_dsu_pmu.c
+++ b/drivers/perf/arm_dsu_pmu.c
@@ -823,7 +823,11 @@ static int __init dsu_pmu_init(void)
if (ret < 0)
return ret;
dsu_pmu_cpuhp_state = ret;
- return platform_driver_register(&dsu_pmu_driver);
+ ret = platform_driver_register(&dsu_pmu_driver);
+ if (ret)
+ cpuhp_remove_multi_state(dsu_pmu_cpuhp_state);
+
+ return ret;
}
static void __exit dsu_pmu_exit(void)