提交 a88dc7ba 编写于 作者: A Arvind Yadav 提交者: Catalin Marinas

drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf

Free memory region, if arm_pmu_acpi_probe is not successful.
Acked-by: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 3d6a7b99
...@@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn) ...@@ -235,6 +235,7 @@ int arm_pmu_acpi_probe(armpmu_init_fn init_fn)
ret = armpmu_register(pmu); ret = armpmu_register(pmu);
if (ret) { if (ret) {
pr_warn("Failed to register PMU for CPU%d\n", cpu); pr_warn("Failed to register PMU for CPU%d\n", cpu);
kfree(pmu->name);
return ret; return ret;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册