From: Arvind Yadav Date: Wed, 20 Sep 2017 06:56:38 +0000 (+0530) Subject: drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a88dc7ba15cd4f4ef5102b5185f8fa7ff86e54e1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Arvind Yadav Signed-off-by: Catalin Marinas --- 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; } }