summaryrefslogtreecommitdiffstats
path: root/drivers/perf
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-09-20 08:56:38 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2017-09-22 16:11:46 +0200
commita88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1 (patch)
treea55b62f5d3d26f38090ee05705e59a5de1ccbf8d /drivers/perf
parentarm64: ensure the kernel is compiled for LP64 (diff)
downloadlinux-a88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1.tar.xz
linux-a88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1.zip
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>
Diffstat (limited to 'drivers/perf')
-rw-r--r--drivers/perf/arm_pmu_acpi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index 0a9b78705ee8..3303dd8d8eb5 100644
--- a/drivers/perf/arm_pmu_acpi.c
+++ b/drivers/perf/arm_pmu_acpi.c
@@ -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;
}
}