All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf
@ 2017-09-20  6:56 ` Arvind Yadav
  0 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-09-20  6:56 UTC (permalink / raw)
  To: linux-arm-kernel

Free memory region, if arm_pmu_acpi_probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/perf/arm_pmu_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/perf/arm_pmu_acpi.c b/drivers/perf/arm_pmu_acpi.c
index 0a9b787..3303dd8 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;
 		}
 	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-22 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-20  6:56 [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Arvind Yadav
2017-09-20  6:56 ` Arvind Yadav
2017-09-22 10:54 ` Will Deacon
2017-09-22 10:54   ` Will Deacon
2017-09-22 14:12   ` Catalin Marinas
2017-09-22 14:12     ` Catalin Marinas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.