|
|
@@ -1184,6 +1184,7 @@ static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
|
|
if (nest_pmus == 1) {
|
|
|
cpuhp_remove_state(CPUHP_AP_PERF_POWERPC_NEST_IMC_ONLINE);
|
|
|
kfree(nest_imc_refc);
|
|
|
+ kfree(per_nest_pmu_arr);
|
|
|
}
|
|
|
|
|
|
if (nest_pmus > 0)
|
|
|
@@ -1208,7 +1209,6 @@ static void imc_common_cpuhp_mem_free(struct imc_pmu *pmu_ptr)
|
|
|
kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]->attrs);
|
|
|
kfree(pmu_ptr->attr_groups[IMC_EVENT_ATTR]);
|
|
|
kfree(pmu_ptr);
|
|
|
- kfree(per_nest_pmu_arr);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1322,6 +1322,8 @@ int init_imc_pmu(struct device_node *parent, struct imc_pmu *pmu_ptr, int pmu_id
|
|
|
ret = nest_pmu_cpumask_init();
|
|
|
if (ret) {
|
|
|
mutex_unlock(&nest_init_lock);
|
|
|
+ kfree(nest_imc_refc);
|
|
|
+ kfree(per_nest_pmu_arr);
|
|
|
goto err_free;
|
|
|
}
|
|
|
}
|