summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-09-20 09:56:38 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2017-09-22 17:11:46 +0300
commita88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1 (patch)
treea55b62f5d3d26f38090ee05705e59a5de1ccbf8d
parent3d6a7b99e3fa29b92d6288487e057e0a596bd2b0 (diff)
downloadlinux-a88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1.tar.xz
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>
-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;
}
}