From patchwork Tue Nov 29 16:47:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 84872 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1677454qgi; Tue, 29 Nov 2016 08:49:00 -0800 (PST) X-Received: by 10.84.141.1 with SMTP id 1mr63014144plu.133.1480438139937; Tue, 29 Nov 2016 08:48:59 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t78si60654544pfj.273.2016.11.29.08.48.59; Tue, 29 Nov 2016 08:48:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933064AbcK2Qsz (ORCPT + 25 others); Tue, 29 Nov 2016 11:48:55 -0500 Received: from mail-io0-f170.google.com ([209.85.223.170]:34919 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756589AbcK2Qra (ORCPT ); Tue, 29 Nov 2016 11:47:30 -0500 Received: by mail-io0-f170.google.com with SMTP id a124so299169704ioe.2 for ; Tue, 29 Nov 2016 08:47:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X37Q4VEz9m4nK88nLfCg9soUpY545u3tkEMLYuPeDeA=; b=Tw26Hcnf9b26ncq3nQeNHOHHzWC/Noza2868eBryZk0K31CoSeOhujTz09m4pkLeOk wVSlLKsFb9YNzhk+OoUYGB+x7bAENnRAvj7XAECKoSJpjqU/tLD8EbIrYcA6e2mkaS3n Giqb8crD68KVoas+RzHCHNnaJG0HGBkfj4N0w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X37Q4VEz9m4nK88nLfCg9soUpY545u3tkEMLYuPeDeA=; b=Xzj0GmzM4lAzKl2/HI4ErD6Lcdk/2kwhrgsFi2TkKB015tpaqIrc6kbj3udnQjj2Ji +9xLarb4EcC/feeVBZVcD6xNGA8xHpTSwwFwNu4Jpyq93Zsxub83q9vz1Uin7PLHYBay BQgSZ6XpNJk1vzRNQyH0KUm8RVrtcIN7IlDXO64uFiVhitJ8g9FeG3nWo2wf24WsKuOa 3o1j20KzqKfk0oRT0zQe6STw+WuAb2R/y9tUi8/NPJ82ztHJELYKyCqqfjy3Rc1Hip7Z oNk0aVRismMI/Vrimc9VPvTCNcCjWObWE7G+WxZJOTjymIdpeiDwTO4ndaEsE3nFmr3z gqkg== X-Gm-Message-State: AKaTC03/iVJk3N3GdR6n1yL4hrva/uA9ASRe2Yk1V6BO5uhazvQ48IpVTF/J81y3pOplYR7C X-Received: by 10.36.16.193 with SMTP id 184mr14420249ity.25.1480438049638; Tue, 29 Nov 2016 08:47:29 -0800 (PST) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id l3sm21810442ioa.7.2016.11.29.08.47.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Nov 2016 08:47:29 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 9/9] coresight: perf: Add a missing call to etm_free_aux Date: Tue, 29 Nov 2016 09:47:19 -0700 Message-Id: <1480438039-24960-10-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480438039-24960-1-git-send-email-mathieu.poirier@linaro.org> References: <1480438039-24960-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quentin Lambert 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 Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 5a346fc8ce06..17741969026e 100644 --- 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, void **pages, */ sink = coresight_get_enabled_sink(true); if (!sink) - return NULL; + goto err; INIT_WORK(&event_data->work, free_event_data);