From patchwork Wed Mar 20 06:36:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10860915 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 9D01D13B5 for ; Wed, 20 Mar 2019 06:37:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A31329A1D for ; Wed, 20 Mar 2019 06:37:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E00229A1F; Wed, 20 Mar 2019 06:37:19 +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 1F3B429A1D for ; Wed, 20 Mar 2019 06:37:19 +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=UxqzQYCE+uG64N0N4EegnlELJwkcTxbsp7/kB8ZX1Wg=; b=r9A6z42bm8bekH 0WJddXe5UOhDVybt0VjUYJEZFDTqw7IwHlEIgkumLf1LxZWSoUU03pdICdpPEzOtgfbFGxMWiho4N Vz04siYpZ7Lp6LShWMx9cXaD+wXtu6+szQT5Q8gk+g0yXEAyEBRYIjpHCzW+cofSdSbXT2LqrcaKM xVBnnuRVqaNtTXfH6OD0ofPu0MaRb2G9vmAGok7gLRAH2pkGFvdbHi/c30N41uxmX6p0bQRyclKQk yErMP28yvSaOLM0qJdWcVqZJOLGpld+i6DyBXSr9p4Z3JGJSudRBqERAci346C79VFubRNqygYbkZ QteiLeShgaF1NyfaMGzQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Uqj-0000b5-0H; Wed, 20 Mar 2019 06:37:17 +0000 Received: from szxga07-in.huawei.com ([45.249.212.35] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h6Uqc-0000QK-Hx for linux-arm-kernel@lists.infradead.org; Wed, 20 Mar 2019 06:37:13 +0000 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7C330136A6578CF9A5A8; Wed, 20 Mar 2019 14:37:06 +0800 (CST) Received: from localhost (10.177.31.96) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.408.0; Wed, 20 Mar 2019 14:36:57 +0800 From: Yue Haibing To: , , , , , , , , Subject: [PATCH 1/2] perf cs-etm: Remove errnoeous ERR_PTR() usage in in cs_etm__process_auxtrace_info Date: Wed, 20 Mar 2019 14:36:25 +0800 Message-ID: <20190320063626.14792-2-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 In-Reply-To: <20190320063626.14792-1-yuehaibing@huawei.com> References: <20190320063626.14792-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190319_233711_229982_34486BAC X-CRM114-Status: GOOD ( 10.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: YueHaibing , linux-kernel@vger.kernel.org, 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_info9) return -ENOMEM instead. Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") Signed-off-by: YueHaibing --- 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 1108049..fd7f1da 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -1908,7 +1908,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; }