Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751701AbdITG5m (ORCPT ); Wed, 20 Sep 2017 02:57:42 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33242 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751397AbdITG5j (ORCPT ); Wed, 20 Sep 2017 02:57:39 -0400 X-Google-Smtp-Source: AOwi7QCrVR3Kt9IoNfLXpzTyLgkL2owyxHEg2V3xn5oKwkQUu9CJdCXRF157AUCRFtrpQ89dWNSdnw== From: Arvind Yadav To: will.deacon@arm.com, mark.rutland@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] drivers/perf: arm_pmu_acpi: Release memory obtained by kasprintf Date: Wed, 20 Sep 2017 12:26:38 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 584 Lines: 21 Free memory region, if arm_pmu_acpi_probe is not successful. Signed-off-by: Arvind Yadav --- 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