Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbcKSR7x (ORCPT ); Sat, 19 Nov 2016 12:59:53 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32787 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753038AbcKSR7t (ORCPT ); Sat, 19 Nov 2016 12:59:49 -0500 From: Quentin Lambert To: Mathieu Poirier , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Cc: Quentin Lambert Subject: [PATCH] coresight: perf: Add a missing call to etm_free_aux Date: Sat, 19 Nov 2016 18:41:24 +0100 Message-Id: <20161119174124.20136-1-lambert.quentin@gmail.com> X-Mailer: git-send-email 2.10.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 22 Most error branches following the call to alloc_event_data contain a call to etm_free_aux. This patch add a call to etm_free_aux to an error branch that does not call it. This issue was found with Hector. Signed-off-by: Quentin Lambert --- drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -215,7 +215,7 @@ static void *etm_setup_aux(int event_cpu */ sink = coresight_get_enabled_sink(true); if (!sink) - return NULL; + goto err; INIT_WORK(&event_data->work, free_event_data);