From patchwork Mon Jul 15 21:11:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 11045039 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84937746 for ; Mon, 15 Jul 2019 21:14:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6840D283AF for ; Mon, 15 Jul 2019 21:14:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5BEC228492; Mon, 15 Jul 2019 21:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D9FA9283AF for ; Mon, 15 Jul 2019 21:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yRLuOfZFKCLwdpMc+fXeZcfStGjeYwUcOPBvtfagefY=; b=XYDMRm8zoqC07/ 9+VbTLM40lD8lHg7U8O+F1Z/mUIWvm2N/Jg+5PK7xRimmfuwlTxkv8cW0uMjWo/MNXAWQxyfzTiSz b/gjq7CQxzxsk+qBgOAKRZWhkeb0LoHyIfFsOjm+PHX8l57jPOBM2Yzc+vAyQd+VZxDyAus98CeWL L7cyt2XWX73n2pGf2K2G97JsswRIRQqf0EzRQnp8OGLo5rF3ZOVFjYfArUc2QrktYL4A7oooGgwH7 fNc3m1V768rIxaBmFvTxsh81Rmnf8wl8Ly9FArhOy2H2LvZHp2lQd7jHkSGOEbxY3nnSYV2Ti2wao FQ1ohHjctPwc/QAVUQuA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hn8Ij-0000xg-Bu; Mon, 15 Jul 2019 21:14:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hn8Ig-0000xC-7q for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2019 21:14:23 +0000 Received: from quaco.ghostprotocols.net (179-240-129-12.3g.claro.net.br [179.240.129.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E3AB20665; Mon, 15 Jul 2019 21:14:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563225261; bh=njW0bB1LOwlsjkJq3l6wKORuSwdcELkmmTcNsV37EB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1mSZYFK5WSO+eBV1AXjSMPlXe3f9G1xVTSpAdyKImqwH8yxwXwboLiioFoUWpcYRT 2N4IfAKCn+D5xbBxRi80oZPfWaFaJXGTqVumMeNrfgJpHrwwgHKfO68Ufkf6JYhXyv xtb63FWRM1B0dIJjJVVF8Eun3BTRHDA9sXDCyiT0= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Subject: [PATCH 25/28] perf cs-etm: Remove errnoeous ERR_PTR() usage in cs_etm__process_auxtrace_info Date: Mon, 15 Jul 2019 18:11:57 -0300 Message-Id: <20190715211200.10984-26-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190715211200.10984-1-acme@kernel.org> References: <20190715211200.10984-1-acme@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190715_141422_301048_25708DF3 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Arnaldo Carvalho de Melo , Mathieu Poirier , Suzuki Poulouse , Clark Williams , YueHaibing , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Alexander Shishkin , Peter Zijlstra , Jiri Olsa , Namhyung Kim , Jiri Olsa , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: YueHaibing intlist__findnew() doesn't uses ERR_PTR() as a return mechanism so its callers shouldn't try to extract the error using PTR_ERR( ret) from intlist__findnew(), make cs_etm__process_auxtrace_info return -ENOMEM instead. Signed-off-by: YueHaibing Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") Link: http://lkml.kernel.org/r/20190321023122.21332-2-yuehaibing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/cs-etm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 67b88b599a53..2e9f5bc45550 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -2460,7 +2460,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event, /* Something went wrong, no need to continue */ if (!inode) { - err = PTR_ERR(inode); + err = -ENOMEM; goto err_free_metadata; }