From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4938C43381 for ; Mon, 18 Mar 2019 17:15:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B07D720863 for ; Mon, 18 Mar 2019 17:15:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="OjSPibF3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B07D720863 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=76PD6Vyl8JGBruhxtmHNPT0SLKepAA95O9xJRGf/96c=; b=OjSPibF3Kstk6b 3K4m0zHOgWvPSY3IxjojDEPQg5CHTVeawN9v/fN+8V6u98658FA9XUrEowulLc/UImHstC9HrMn6M 5gl/Acj2XLzWT/+wWk5FSemyH/R3ka+GCPG8p5bwjVKtvBWy0yeNbZyKS6OQOKCWNfh+JXDMw9Y8I ZkOqdvXN/o67zDYGvqSvV9go5YCNS3IY83DzU5DhsNtJEJx9umi5BBApUkZ4B4+UwUu6Jd6gD1yYr 04VwHpdfspBeJ4K+/jHi1r2sZjZJqY4EX/+EsiBfe3/AfYGuHFsyDhWh1fASz49GGjf0J1WfZDFaD pyjam8ZJuPMBzA55Pibw==; 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 1h5vr9-000261-HM; Mon, 18 Mar 2019 17:15:23 +0000 Received: from [190.15.121.82] (helo=quaco.ghostprotocols.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5vr7-00025n-K9; Mon, 18 Mar 2019 17:15:21 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 6EB634039C; Mon, 18 Mar 2019 14:15:18 -0300 (-03) Date: Mon, 18 Mar 2019 14:15:18 -0300 From: Arnaldo Carvalho de Melo To: Yue Haibing Subject: Re: [PATCH] perf tools: return errcode in cs_etm__process_auxtrace_info Message-ID: <20190318171518.GH22548@kernel.org> References: <20190315022649.17848-1-yuehaibing@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190315022649.17848-1-yuehaibing@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.10.1 (2018-07-13) 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: mathieu.poirier@linaro.org, suzuki.poulose@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, mingo@redhat.com, namhyung@kernel.org, jolsa@redhat.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Em Fri, Mar 15, 2019 at 10:26:49AM +0800, Yue Haibing escreveu: > From: YueHaibing > > 'err' is set in err path, but it's not returned to callers. > Also fix a pass zero to PTR_ERR issue. Next time please submit two patches, one for the PTR_ERR and another for not throwing away the err = -E!INVAL and returning just -EINVAL, I'm doing it this time. - Arnaldo > Fixes: cd8bfd8c973e ("perf tools: Add processing of coresight metadata") > Signed-off-by: YueHaibing > --- > tools/perf/util/cs-etm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > index 1108049..111f33c 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; > } > > @@ -2023,5 +2023,5 @@ int cs_etm__process_auxtrace_info(union perf_event *event, > err_free_hdr: > zfree(&hdr); > > - return -EINVAL; > + return err; > } > -- > 2.7.0 > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel