Commit 26242b33 authored by Thomas Gleixner's avatar Thomas Gleixner

bus: arm-ccn: Prevent hotplug callback leak

In case the driver registration fails, the hotplug callback is leaked.

Not fatal, because it's never invoked as there are no instances registered,
but wrong nevertheless.

Fixes: fdc15a36 ("bus/arm-ccn: Convert to hotplug statemachine")
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
parent 834fcd29
...@@ -1570,7 +1570,10 @@ static int __init arm_ccn_init(void) ...@@ -1570,7 +1570,10 @@ static int __init arm_ccn_init(void)
for (i = 0; i < ARRAY_SIZE(arm_ccn_pmu_events); i++) for (i = 0; i < ARRAY_SIZE(arm_ccn_pmu_events); i++)
arm_ccn_pmu_events_attrs[i] = &arm_ccn_pmu_events[i].attr.attr; arm_ccn_pmu_events_attrs[i] = &arm_ccn_pmu_events[i].attr.attr;
return platform_driver_register(&arm_ccn_driver); ret = platform_driver_register(&arm_ccn_driver);
if (ret)
cpuhp_remove_multi_state(CPUHP_AP_PERF_ARM_CCN_ONLINE);
return ret;
} }
static void __exit arm_ccn_exit(void) static void __exit arm_ccn_exit(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment