mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: fdc15a36d8 ("bus/arm-ccn: Convert to hotplug statemachine")
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Pawel Moll <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Will Deacon <[email protected]>
This commit is contained in:
parent
834fcd2980
commit
26242b3300
1 changed files with 4 additions and 1 deletions
|
|
@ -1570,7 +1570,10 @@ static int __init arm_ccn_init(void)
|
|||
for (i = 0; i < ARRAY_SIZE(arm_ccn_pmu_events); i++)
|
||||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue