drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf

Free memory region, if arm_pmu_acpi_probe is not successful.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
Arvind Yadav 2017-09-20 12:26:38 +05:30 committed by Catalin Marinas
parent 3d6a7b99e3
commit a88dc7ba15

View File

@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
ret = armpmu_register(pmu);
if (ret) {
pr_warn("Failed to register PMU for CPU%d\n", cpu);
kfree(pmu->name);
return ret;
}
}