Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp4479543ybx; Mon, 4 Nov 2019 14:07:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyMg9xKskJvUa7HZurAY2AiWUswi8vmmO1+FS7ruYHw3qBiP+uBqyotvdTdsu+lSllD/6uo X-Received: by 2002:a50:c30d:: with SMTP id a13mr28932555edb.177.1572905228152; Mon, 04 Nov 2019 14:07:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572905228; cv=none; d=google.com; s=arc-20160816; b=zYgsEuqgcsmI103qz2LVqe5crhxowBWAu+gIu2tpA/HitpYSQ7B4hD4LMySLkk2DNi r7AVqAiVmIlPD00oaV5QETQv6C6wWJ6LZ8TOfD0K8o6qbKLZjSCdhA1B7aAW2ctNntTz mQeUVg/5ZgY7+jtBoGo0t4HKo3gzWlyo8U0EHkTqf3jMydyZE6jcAwnAmuXXVODixOP9 40fFbo3zQpBheoYjBnVbx9GRjE5wpVvVZ2g1zag8oTBmcM63TbinZMjOrbgSwJFlV0t8 OzLpmISMhHs78gSLU2XEUTmpGDpH4Dt2+7cRYE/wRoRu1ZH36bUpf03thjvhV/3vFg5d Nwzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sxxoohKeja1jyVMURglmP133sHFTWG8bHBy5z3db91M=; b=WVGJjtBRiayRx7tihN1dxP8Ha2ou1t1GkRXkGQxGVN9Cw+5lrPGCCDe0lekrqH4V9X DLcnTELe0dhm0l4KWA3Ba735Oi7haOhjInijhWmJisaaxYMc3K7/hraESDjaYkJ39crq +H4JSkOtU+5CQPxKoJkeRvKZssTxTE8Iic11f3fp1yycNPK8/EBtFJbx4/ssrow/qdCX c2+eibxuwtaT7+TGoah+kiGbX93qqgQy/n8ySVGrugq+j2n8CQ2b0s7sHhAsE1tyG4NY 31F+G1eUHptYaMzLNb+c+hbF//O7NA7n1jGKGTtq5nOhZAGm+KqbgUF5xLYygH9S7dSc U/4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C7auxa1S; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e56si8308980edb.355.2019.11.04.14.06.45; Mon, 04 Nov 2019 14:07:08 -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=@kernel.org header.s=default header.b=C7auxa1S; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389672AbfKDWE3 (ORCPT + 99 others); Mon, 4 Nov 2019 17:04:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:35012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389655AbfKDWEW (ORCPT ); Mon, 4 Nov 2019 17:04:22 -0500 Received: from localhost (6.204-14-84.ripe.coltfrance.com [84.14.204.6]) (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 9D9E7205C9; Mon, 4 Nov 2019 22:04:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1572905062; bh=T0CouP6WpoDSSLflItbBgJHRt3Dc+ee9mKxmKruvkOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C7auxa1SrurV5PmmljmNO9HXPy9xNJGK+l1ILFWICsotCd5cSfwcTsTrhTBY/+Whd cgZgFO6FbY4rXWYIRGiiPLRWEXKKCBSFWKZtJcfBRaS2tMtwi4GBa/2Qlz7pTnliQC +D+oFTtHLTg6u+VTs4GJ8c+xpihVDfSKpCbiMHU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King - ARM Linux admin , Adrian Hunter , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Will Deacon , Arnaldo Carvalho de Melo , Sasha Levin , Peter Zijlstra Subject: [PATCH 5.3 016/163] perf annotate: Propagate the symbol__annotate() error return Date: Mon, 4 Nov 2019 22:43:26 +0100 Message-Id: <20191104212141.605663467@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191104212140.046021995@linuxfoundation.org> References: <20191104212140.046021995@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnaldo Carvalho de Melo [ Upstream commit 211f493b611eef012841f795166c38ec7528738d ] We were just returning -1 in symbol__annotate() when symbol__annotate() failed, propagate its error as it is used later to pass to symbol__strerror_disassemble() to present a error message to the user, that in some cases were getting: "Invalid -1 error code" Fix it to propagate the error. Reported-by: Russell King - ARM Linux admin Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra , Cc: Will Deacon Link: https://lkml.kernel.org/n/tip-0tj89rs9g7nbcyd5skadlvuu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index 2dac51e9e4180..ca8b517e38fa8 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -2991,7 +2991,7 @@ int symbol__annotate2(struct symbol *sym, struct map *map, struct perf_evsel *ev out_free_offsets: zfree(¬es->offsets); - return -1; + return err; } #define ANNOTATION__CFG(n) \ -- 2.20.1